AnimeSuki Forum (
-   Forum & Site Feedback (
-   -   Bug - Beta site (

LostLogic 2011-04-13 01:15

Bug - Beta site
Got this on as soon as I signed in with my Forum username:


ErrorException: Undefined property AnimeSukiSession::$favorites in /home/animesuki/ on line 68
#0 /home/animesuki/ Session->__get('favorites')
#1 /home/animesuki/ AnimeSukiSession->__get('favorites')
#2 /home/animesuki/ AnimeSukiController->Menu(1)
#3 /home/animesuki/ IndexController->ActionDefault()
#4 /home/animesuki/ Controller->Run()
#5 {main}

Since I didn't see a forum for feedback on the beta site, I'm posting this here.

GHDpro 2011-04-13 04:54

Thank you very much for the bug report, as this error would have only showed up upon first login (on the beta site) for users, which would then obviously be stumped at this error.

A work-around would have been to simply delete the cookies for and try to login again - on the 2nd attempt a login would have worked.

But of course I've now fixed the problem, so it shouldn't happen again.

Technical explanation: upon first login the session class did not initialize certain custom fields from the user table (the "favorites" field among them). Combine that with the nasty behavior of isset() to also return false when a value is set but null (which was what my database object was returning for the uninitialized fields) and you get this error. Due to the session fields being cached in memcache, the error perpetuated between pages.

The solution was to reload all values from the user table after saving any new values (ie: last login time) after login, thereby properly initializing all values.

All times are GMT -5. The time now is 19:07.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2017, vBulletin Solutions Inc.