#35895 [Opn->Csd]: __sleep and private property

From: Date: Wed, 04 Jan 2006 19:41:28 +0000
Subject: #35895 [Opn->Csd]: __sleep and private property
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-91482@lists.php.net to get a copy of this message
ID: 35895 Updated by: sniper@php.net Reported By: f dot hardy at origami-systems dot com -Status: Open +Status: Closed Bug Type: Scripting Engine problem Operating System: Freebsd 6 PHP Version: 5.1.1 New Comment: This bug has been fixed in CVS. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2006-01-04 18:57:38] f dot hardy at origami-systems dot com It is the same bug than #26737, which is closed !! The workaround return array("a", // "\0*\0b", // "\0" . __CLASS__ . "\0c"); is ok ! ------------------------------------------------------------------------ [2006-01-04 17:36:20] f dot hardy at origami-systems dot com Description: ------------ if __sleep return a private property in its array, php say : Unknown: "foo" returned as member variable from __sleep() but does not exist Reproduce code: --------------- <?php class foo { private $foo = array(); public function __construct() { ; } public function __sleep() { return array('foo'); } } ?> Expected result: ---------------- php must find a private property wich is return by __sleep. Actual result: -------------- Unknown: "foo" returned as member variable from __sleep() but does not exist ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=35895&edit=1

« previous php.bugs (#91482) next »