note 43738 added to language.oop.magic-functions
| From: | EricatFootstepsdotnl at rn2 dot php dot net | Date: | Thu, 01 Jul 2004 19:29:40 +0000 |
| Subject: | note 43738 added to language.oop.magic-functions | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-72278@lists.php.net to get a copy of this message | ||
It appears, that although __wakeup() can read from global defined variables // global $variable; ,
changing those variables don't affect them outside __wakeup().
The same thing seems to happen when an object is being serialized in a session when you start your
session. if your __wakeup() function tries to set something within your session it might get
overwritten/lost. In my situation it happened when an object in an object in a session tried to
change a session variable on __wakup().
In my case, putting the variable in $GLOBAL and moving the variable in the session at a later time,
is a satisfying workaround.
----
Manual Page -- http://www.php.net/manual/en/language.oop.magic-functions.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+43738
Delete -- http://master.php.net/manage/user-notes.php?action=delete+43738&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+43738&report=yes
Search -- http://master.php.net/manage/user-notes.php