Bug #12497 Updated: Problem with serialize/unserialize
| From: | sander@php.net | Date: | Sun, 11 Nov 2001 11:16:08 +0000 |
| Subject: | Bug #12497 Updated: Problem with serialize/unserialize | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-70091@lists.php.net to get a copy of this message | ||
ID: 12497
Updated by: sander
Reported By: ricardo@construnet.com.br
Old Status: Feedback
Status: Closed
Bug Type: Class/Object related
Operating System: Any
PHP Version: 4.0.6
New Comment:
No feedback. Closing.
Previous Comments:
------------------------------------------------------------------------
[2001-10-21 20:01:49] sniper@php.net
Please include a shortest possible and complete example
function which can be used by just copy'n'pasting it and
which does not work.
--Jani
------------------------------------------------------------------------
[2001-07-31 16:37:32] ricardo@construnet.com.br
$myVar = "Some Text";
$myVarCopy = $myVar;
$myVar = unserialize(serialize($myVarCopy));
echo "MD5 Of myVar: ". md5(serialize($myVar))."<BR>";
echo "MD5 Of myVarCopy: ". md5(serialize($myVarCopy))."<BR>";
This is okay, but if $myVar is a complex Object, for instance an Object which has variables that
point to other objects (and so on), the serialization fails badly. The class is restored
appropriately (knows it´s type etc) but there is data missing...
------------------------------------------------------------------------
Edit this bug report at http://bugs.php.net/?id=12497&edit=1