Bug #48388 [Asn->Csd]: ArrayObject and __sleep()
| From: | mike@php.net | Date: | Tue, 18 May 2010 14:25:54 +0000 |
| Subject: | Bug #48388 [Asn->Csd]: ArrayObject and __sleep() | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-150565@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=48388&edit=1
ID: 48388
Updated by: mike@php.net
Reported by: david at grudl dot com
Summary: ArrayObject and __sleep()
-Status: Assigned
+Status: Closed
Type: Bug
Package: SPL related
Operating System: *
PHP Version: 5.2.9
Assigned To: colder
New Comment:
Fixed in 5.3.
Previous Comments:
------------------------------------------------------------------------
[2009-05-25 15:49:14] david at grudl dot com
Description:
------------
ArrayObject descendants can be forced to serialize
public/protected/private properies using __sleep(), but it produces
E_NOTICE
Reproduce code:
---------------
class Test extends ArrayObject
{
public $var = 123;
public function __sleep()
{
return array('var');
}
}
$test = new Test;
$s = serialize($test);
Expected result:
----------------
none
Actual result:
--------------
Notice: serialize() [function.serialize]: "var" returned as member
variable from __sleep() but does not exist
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=48388&edit=1