php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59347 Save Object with Private Properties into Session error
Submitted: 2010-08-09 06:46 UTC Modified: 2011-05-06 06:34 UTC
From: tinnyliu at gmail dot com Assigned:
Status: Closed Package: tokyo_tyrant (PECL)
PHP Version: 5.3.2 OS: CentOS5
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: tinnyliu at gmail dot com
New email:
PHP Version: OS:

 

 [2010-08-09 06:46 UTC] tinnyliu at gmail dot com
Description:
------------
1. set session handler to tokyo_tyrant
2. start session
3. save an object with private/protected properties into $_SESSION
4. check $_SESSION

Reproduce code:
---------------
<?php
class Foo{
   private $bar;
}
session_start();
$_SESSION['foo'] = new Foo;
?>

page2.php
<?php
session_start();
var_dump($_SESSION);
?>

Expected result:
----------------
$_SESSION['foo'] is an instance of Foo

Actual result:
--------------
$_SESSION['foo'] is null

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-12-29 22:30 UTC] mkoppanen@php.net
Hi,

this is now fixed in github and should be in next release. Sorry for the delay
 [2011-05-06 06:34 UTC] tinnyliu at gmail dot com
thanks!
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Jan 15 15:01:31 2025 UTC