ID: 48388
Updated by: [email protected]
Reported By: david at grudl dot com
-Status: Open
+Status: Assigned
Bug Type: SPL related
Operating System: *
PHP Version: 5.2.9
-Assigned To:
+Assigned To: colder
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/?id=48388&edit=1