#31313 [Opn->Fbk]: $this reference is bad during __wakeup
| From: | sniper@php.net | Date: | Mon, 17 Jan 2005 17:42:17 +0000 |
| Subject: | #31313 [Opn->Fbk]: $this reference is bad during __wakeup | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-72311@lists.php.net to get a copy of this message | ||
ID: 31313
Updated by: sniper@php.net
Reported By: bugs dot php dot net at future dot shiny dot co dot il
-Status: Open
+Status: Feedback
Bug Type: Scripting Engine problem
Operating System: FreeBSD
PHP Version: 4.3.10
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php4-STABLE-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php4-win32-STABLE-latest.zip
And if you can reproduce it, please come up with simple test case.
Previous Comments:
------------------------------------------------------------------------
[2004-12-27 18:19:11] bugs dot php dot net at future dot shiny dot co
dot il
Description:
------------
This is a re-open of Bug #13968.
I can still see the same issue happening with PHP 4.3.10. Just like the
previous poster (in bug #13968), I cannot reproduce this with simple
code. However, the general idea is this:
class Base
{
var $resource = new Resource();
function __wakeup()
{
// In a saved session, the resource lost relevance, so we reopne
it:
$this->resource = open_resource(); // <-- this corrupts Thing's
another_member
}
};
class Child extends Base
{
};
class Thing
{
var $member;
var $another_member; // <-- when wakes up, this is equal to the
Resource we open in Base's __wakeup.
function Thing()
{
$this->member = new Child();
$this->another_member = 12345;
}
};
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=31313&edit=1