PHP Fatal error:  Call to a member function getSyncKey() on a non-object