php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #48860 SplQueue objects can not be stored in session
Submitted: 2009-07-09 00:28 UTC Modified: 2012-11-14 00:48 UTC
Votes:6
Avg. Score:4.8 ± 0.4
Reproduced:6 of 6 (100.0%)
Same Version:4 (66.7%)
Same OS:6 (100.0%)
From: dave at dtracorp dot com Assigned: levim (profile)
Status: Closed Package: SPL related
PHP Version: 5.3, 6 OS: *
Private report: No CVE-ID: None
 [2009-07-09 00:28 UTC] dave at dtracorp dot com
Description:
------------
I'm trying to store an SplQueue object in the session, on page reload the SplQueue object is still there, but it has no data. This happens on Windows XP (Apache 2.0.58), but also on Fedora 8 (apache 2.2), and a Debian build running apache 2.2.

Reproduce code:
---------------
<?php
	$q = new SplQueue();
	$q->enqueue('something');
	$q->enqueue('over there');
	session_start();
	$_SESSION['q'] = $q;
?>
on the second page
<?php
	session_start();
	$q = $_SESSION['q'];
	print '<pre>';
	print_r($q);

Expected result:
----------------
SplQueue Object
(
    [flags:SplDoublyLinkedList:private] => 4
    [dllist:SplDoublyLinkedList:private] => Array
        (
            [0] => something
            [1] => over there
        )

)


Actual result:
--------------
SplQueue Object
(
    [flags:SplDoublyLinkedList:private] => 4
    [dllist:SplDoublyLinkedList:private] => Array
        (
        )

)


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-08-07 10:29 UTC] jani@php.net
This is just missing feature. Several other SPL classes also don't implement the Serializable interface.
 [2010-04-25 06:22 UTC] colder@php.net
-Type: Bug +Type: Feature/Change Request
 [2011-07-12 17:43 UTC] colder@php.net
Automatic comment from SVN on behalf of colder
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=313183
Log: Fix #48860 Implement Serialization for DLL
 [2011-07-12 17:45 UTC] colder@php.net
-Status: Assigned +Status: To be documented -Assigned To: colder +Assigned To:
 [2011-07-12 17:45 UTC] colder@php.net
Serialization implemented as of 5.4
 [2012-04-18 09:49 UTC] laruence@php.net
Automatic comment on behalf of colder
Revision: http://git.php.net/?p=php-src.git;a=commit;h=c13f2c3e2c22829d58d6f5b9b8106ae76b580b52
Log: Fix #48860 Implement Serialization for DLL
 [2012-07-24 23:40 UTC] rasmus@php.net
Automatic comment on behalf of colder
Revision: http://git.php.net/?p=php-src.git;a=commit;h=c13f2c3e2c22829d58d6f5b9b8106ae76b580b52
Log: Fix #48860 Implement Serialization for DLL
 [2012-11-14 00:48 UTC] levim@php.net
Thank you for your bug report. This issue has already been fixed
in the latest released version of PHP, which you can download at 
http://www.php.net/downloads.php


 [2012-11-14 00:48 UTC] levim@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: levim
 [2013-11-17 09:37 UTC] laruence@php.net
Automatic comment on behalf of colder
Revision: http://git.php.net/?p=php-src.git;a=commit;h=c13f2c3e2c22829d58d6f5b9b8106ae76b580b52
Log: Fix #48860 Implement Serialization for DLL
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 00:01:29 2024 UTC