php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #48387 ArrayObject and properties serialization
Submitted: 2009-05-25 15:46 UTC Modified: 2010-05-18 16:11 UTC
Votes:4
Avg. Score:4.5 ± 0.5
Reproduced:4 of 4 (100.0%)
Same Version:3 (75.0%)
Same OS:3 (75.0%)
From: david at grudl dot com Assigned: colder (profile)
Status: Wont fix Package: SPL related
PHP Version: 5.2.9 OS: *
Private report: No CVE-ID: None
 [2009-05-25 15:46 UTC] david at grudl dot com
Description:
------------
In PHP 5.2.x there are not serialized any public/protected/private properies of ArrayObject descendants.



Reproduce code:
---------------
class Test extends ArrayObject
{
	public $var;
}

$test = new Test;
$test->var = 'hello';
$dolly = unserialize(serialize($test));
echo $dolly->var;

Expected result:
----------------
-> hello

Actual result:
--------------
none

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-02-28 10:55 UTC] seld@php.net
For what it's worth, the reproduce code works perfectly fine with php5.3.0
 [2010-04-18 00:17 UTC] jhominal at gmail dot com
I believe I had the same problem on PHP 5.2.13, on Debian Lenny (package provided 
by dotdeb)
 [2010-05-18 16:11 UTC] mike@php.net
-Status: Assigned +Status: Wont fix
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Oct 08 15:01:27 2024 UTC