Bug #12497: Problem with serialize/unserialize
| From: | ricardo at construnet dot com dot br | Date: | Tue, 31 Jul 2001 20:37:32 +0000 |
| Subject: | Bug #12497: Problem with serialize/unserialize | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-61686@lists.php.net to get a copy of this message | ||
From: ricardo@construnet.com.br
Operating system: Any
PHP version: 4.0.6
PHP Bug Type: Class/Object related
Bug description: Problem with serialize/unserialize
$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 bug report at: http://bugs.php.net/?id=12497&edit=1