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 this is not your bug, you can add a comment by following this link.
If this is your bug, but 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

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 06:01:29 2024 UTC