AnimeSuki Forums

Register Forum Rules FAQ Members List Social Groups Search Today's Posts Mark Forums Read

Go Back   AnimeSuki Forum > General > Forum & Site Feedback

Reply
 
Thread Tools
Old 2011-04-13, 01:15   Link #1
LostLogic
Definition of Slacker
 
 
Join Date: Apr 2007
Location: Norway
Age: 30
Exclamation Bug - Beta site

Got this on beta.animesuki.com as soon as I signed in with my Forum username:

Code:
ErrorException: Undefined property AnimeSukiSession::$favorites in /home/animesuki/beta.animesuki.com/lib/class.session.php on line 68
Trace
#0 /home/animesuki/beta.animesuki.com/lib/class.animesuki.php(316): Session->__get('favorites')
#1 /home/animesuki/beta.animesuki.com/lib/class.animesuki.php(56): AnimeSukiSession->__get('favorites')
#2 /home/animesuki/beta.animesuki.com/www/index.php(30): AnimeSukiController->Menu(1)
#3 /home/animesuki/beta.animesuki.com/lib/class.framework.php(409): IndexController->ActionDefault()
#4 /home/animesuki/beta.animesuki.com/www/index.php(245): Controller->Run()
#5 {main}
Since I didn't see a forum for feedback on the beta site, I'm posting this here.
__________________
Signature says "Hello!"
LostLogic is offline   Reply With Quote
Old 2011-04-13, 04:54   Link #2
GHDpro
Administrator
*AnimeSuki Site Staff
*Moderator
 
 
Join Date: Jan 2001
Location: Netherlands
Age: 35
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 AnimeSuki.com 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.
GHDpro is offline   Reply With Quote
Reply

Tags
beta, beta.animesuki.com, bug, website

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 11:57.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
We use Silk.