note 86197 deleted from function.unserialize by aharvey

From: Date: Tue, 06 Nov 2012 01:35:47 +0000
Subject: note 86197 deleted from function.unserialize by aharvey
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-191720@lists.php.net to get a copy of this message
Note Submitter: Ariz JAcinto ---- Here's another way of removing the "__PHP_Incomplete_Class" notice especially if you're fetching the serialized object from a remote web service meaning, you don't have local copy of the class defining the object. You can fix this by creating a class on the local machine that would define the object (*methods wouldn't be necessary). Ex. Object (Before): object(__PHP_Incomplete_Class)#123 (3) { ["__PHP_Incomplete_Class_Name"]=> string(10) "SomeObject" ["property_one"]=> string(5) "Hello" ["property_two"]=> string(5) "World" } Class: class SomeObject{ public $property_one; public $property_two; } Object (After): object(SomeObject)#31 (2) { ["property_one"]=> string(5) "Hello" ["property_two"]=> string(5) "World" }

« previous php.notes (#191720) next »