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
 [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-2020 The PHP Group
All rights reserved.
Last updated: Fri Dec 04 17:01:23 2020 UTC