Call to a member function simplelog() on null
Hi there, My clients website stopped working today with a sweet "Oops ..." error. I analyzed what's happening and found out that: 1. The Facebook adapter returned "request failed: (#4) Application request limit reached" ... probably just a temporary issue with the API. 2. The adapter called logWarning which then calls $GLOBALS["BE_USER"]->simplelog 3. Now, if the user is not a BE user, this throws an exception "Call to a member function simplelog() on null"
Not sure if that's too easy, but don't we just need to check if $GLOBALS["BE_USER"] is available before calling simplelog()?
So change: $GLOBALS["BE_USER"]->simplelog('...');
To: if(isset($GLOBALS["BE_USER"])) $GLOBALS["BE_USER"]->simplelog('...');
That fixed my problems and should avoid future troubles (when Facebook is having issues).
Am i missing something here?
Thanks guys
Frank
Comments (3)
-
-
The changes by Frank Stein solved my problem, too.
-
- changed status to resolved
solved in version 1.3.5
- Log in to comment
Same here but with Instagram. Error message: Core: Exception handler (WEB): Uncaught TYPO3 Exception: Call to a member function simplelog() on null | Error thrown in file /htdocs_public/typo3conf/ext/pb_social/Classes/Adapter/SocialMediaAdapter.php in line 118. Requested URL: my_customer_homepage