note 6245 deleted from function.unserialize by sniper

From: Date: Mon, 13 Oct 2003 03:20:57 +0000
Subject: note 6245 deleted from function.unserialize by sniper
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-58500@lists.php.net to get a copy of this message
Note Submitter: east@canit.se ---- Note: in PHP 4.0.1pl2 something seems to be broke regarding serializing objects of type "stdClass". A class with an object of type "stdClass" cannot be unserialized and used. The following example WONT work: class Foo { var $object; function Foo() { $object = mysql_fetch_object ($result); } } /* code */ $myfoo = new MyFoo(); $s_myfoo = serialize($myfoo); $newfoo = new MyFoo(); $newfoo = unserialize($s_myfoo); /***************/ gives the following error "The script tried to execute a method or access a property of an incomplete object" - even though "stdClass" definition exists and is loaded.

« previous php.notes (#58500) next »