Extension

Archived
Forum
(read-only)


For official support, visit the official support site »

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
Erwin Heiser

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
# 1
Erwin Heiser

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'== OR $this->EE->config->item('debug') != 0
litzinger
# 2
Developer
litzinger

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
# 3
Erwin Heiser

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
# 4
Faculty of Fine Arts, York University

Got this error as well in 2.2.1.

Brian’s posted workaround worked for me.

Oxygen Smith
# 5
Oxygen Smith

I was having the same issue in 2.2.2, and this posted fix also appears to work for me.