Snippet Sync
ExpressionEngine 2
Back to this add-on's main page
View Other Add-ons From Brian Litzinger
Error after update to 2.2
Support Request
Erwin Heiser
|
Posted: 27 June 2011 02:12 PM |
|
|
|
Updated my EE install from 2.1.4 to 2.2 and getting the following error after logging in:
A PHP Error was encountered
Severity: Notice
Message: Trying to get property of non-object
Filename: snippet_sync/ext.snippet_sync.php
Line Number: 132
Any suggestions?
|
|
|
Erwin Heiser
|
Posted: 27 June 2011 03:03 PM |
# 1
|
|
|
The line in question is
// Only sync snippets if logged in as Super Admin (usually a developer) or if debug is explicitly turned on. if($session->userdata['group_id'] == 1 OR $this->EE->config->item('debug') != 0)
|
|
|
litzinger
|
Posted: 27 June 2011 03:47 PM |
# 2
|
|
Developer
|
Not sure what is causing that at the moment, but you can get around it by changing it to:
if((isset($session->userdata) AND $session->userdata['group_id'] == 1) OR $this->EE->config->item('debug') != 0)
Of course in your case since it’s empty you’ll want to set $config[‘debug’] to 1 or 2 so it will sync.
|
|
|
Erwin Heiser
|
Posted: 27 June 2011 03:57 PM |
# 3
|
|
|
Disabled the extension, amended code as per your suggestion and re-enabled. Not seeing any further error messages.
Thanks, Brian!
|
|
|
Faculty of Fine Arts, York University
|
Posted: 22 July 2011 03:32 PM |
# 4
|
|
|
Got this error as well in 2.2.1.
Brian’s posted workaround worked for me.
|
|
|
Oxygen Smith
|
Posted: 26 September 2011 04:13 PM |
# 5
|
|
|
I was having the same issue in 2.2.2, and this posted fix also appears to work for me.
|
|
|