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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: ricardo at construnet dot com dot br
New email:
PHP Version: OS:

 

 [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

Pull Requests

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: Sun Dec 22 02:01:28 2024 UTC