php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #12497 Problem with serialize/unserialize
Submitted: 2001-07-31 16:37 UTC Modified: 2001-11-11 06:16 UTC
From: ricardo at construnet dot com dot br Assigned:
Status: Closed Package: Class/Object related
PHP Version: 4.0.6 OS: Any
Private report: No CVE-ID: None
 [2001-07-31 16:37 UTC] ricardo at construnet dot com dot 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...

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-10-21 20:01 UTC] 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-11-11 06:16 UTC] sander@php.net
No feedback. Closing.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 19:01:30 2024 UTC