Bug #62107 [Com]: SplStack serialization problem
| From: | reeze dot xia at gmail dot com | Date: | Wed, 23 May 2012 05:31:46 +0000 |
| Subject: | Bug #62107 [Com]: SplStack serialization problem | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-170696@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=62107&edit=1
ID: 62107
Comment by: reeze dot xia at gmail dot com
Reported by: ozland2004 at narod dot ru
Summary: SplStack serialization problem
Status: Open
Type: Bug
Package: SPL related
Operating System: CentOS 5.4
PHP Version: 5.3.13
Block user comment: N
Private report: N
New Comment:
SplStack makes use of SplDoubleLinkedList. It isn't serializable in PHP5.3
serialize method was introduced in PHP5.4 and 5.4 only:
http://svn.php.net/viewvc?view=revision&revision=313183
http://cn2.php.net/manual/en/spldoublylinkedlist.serialize.php
Previous Comments:
------------------------------------------------------------------------
[2012-05-22 09:23:50] ozland2004 at narod dot ru
Description:
------------
SplStack object serialization works wrong
Test script:
---------------
$t = new SplStack();
$t->push(1);
var_dump(unserialize(serialize($t)));
Expected result:
----------------
object(SplStack)#32 (2) { ["flags":"SplDoublyLinkedList":private]=> int(6)
["dllist":"SplDoublyLinkedList":private]=> array(1) { [0]=> int(1) } }
Actual result:
--------------
object(SplStack)#31 (2) { ["flags":"SplDoublyLinkedList":private]=> int(6)
["dllist":"SplDoublyLinkedList":private]=> array(0) { } }
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=62107&edit=1