I am getting this error message frequently in my logs. Anyone know how to fix?
PHP Notice: Undefined property: stdClass::$global_sid in /drupal/sites/all/modules/sso/client/singlesignon_client.module on line 47
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | 869830_1_0.patch | 956 bytes | As If |
Comments
Comment #1
mikebann commentedtry clearing your cache under perfrmance - is it usually after you install a new module?
Comment #2
As If commentedGetting same error. I cleared all caches on all sites (master and clients). This error still appears for all client sites.
[UPDATE 1]: This problem comes back occassionally when I'm testing out various configurations, and I think the cookie is related. The way I get past it now is (1) leave the site, (2) clear all cookies including session cookies, (3) clear all cache tables via PHPMyAdmin.
[UPDATE 2]: Each of my client sites was using the master's domain for the cookie domain. I commented out the cookie domain in all my settings.php files, and the error stopped appearing on my sites.
[UPDATE 3]: However, the error WAS still appearing in my error logs. I examined the code and found what I believe to be a syntax error. This conditional...
...will never return a meaningful result because it is looking for a situation where the global sid is NOT SET *AND* SET but not equal to an empty string. I changed it to this:
...and now the errors have finally stopped appearing in my error logs.
Comment #3
As If commentedHere is a patch for the above mod. Run it in the client folder. Please review.
Note: This patch also incorporates the codefix from http://drupal.org/node/596034 (on line 40).
Comment #4
Gryfalcon commentedWhile applying the fix given in #2, while it got rid of the errors, I found it caused other problems, such as being unable to apply default Drupal filters, ie: showing a list of a certain node type.
Looking at the code, I'm thinking the intent was to check if the global_sid was either not set, or was set but empty. As such, I changed
to
which seems to have stopped the errors, without affecting other parts of the site as well.