note 86197 added to function.unserialize
| From: | ArizJAcinto at osu1 dot php dot net | Date: | Tue, 07 Oct 2008 18:47:41 +0000 |
| Subject: | note 86197 added to function.unserialize | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-145135@lists.php.net to get a copy of this message | ||
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"
}
----
Server IP: 64.71.164.2
Probable Submitter: 207.178.4.6
----
Manual Page -- http://www.php.net/manual/en/function.unserialize.php
Edit -- https://master.php.net/note/edit/86197
Del: integrated -- https://master.php.net/note/delete/86197/integrated
Del: useless -- https://master.php.net/note/delete/86197/useless
Del: bad code -- https://master.php.net/note/delete/86197/bad+code
Del: spam -- https://master.php.net/note/delete/86197/spam
Del: non-english -- https://master.php.net/note/delete/86197/non-english
Del: in docs -- https://master.php.net/note/delete/86197/in+docs
Del: other reasons-- https://master.php.net/note/delete/86197
Reject -- https://master.php.net/note/reject/86197
Search -- https://master.php.net/manage/user-notes.php