#35557 [NEW]: Non-scalar properties of objects stored in session variables aren't kept
From: fcardinaux at gmail dot com
Operating system: Windows XP Pro
PHP version: 5CVS-2005-12-05 (snap)
PHP Bug Type: Session related
Bug description: Non-scalar properties of objects stored in session variables aren't kept
Description:
------------
Classes are defined in the file class.php. The class bar contains only one
scalar property. The class foo contains three properties : an instance of
the class bar, an array and a scalar property.
In index.php, an instance of foo is stored in a session variable. Then the
print_r function is called to display this variable's content.
There isn't any bug at this point yet.
By clicking on 'continue', you open the next file : verification.php.
There, the print_r function is called again.
As you can see, the content of the non-scalar properties of foo is lost.
This is different from the behaviour of php versions until 5.0.5.
Reproduce code:
---------------
www.cardinaux.info/session_problem_with_php_5_1_2_dev.zip
Expected result:
----------------
Verification.php should output :
Foo Session Variable :
foo Object ( [_bar:private] => bar Object ( [_value:private] => 54321 )
[_names:private] => Array ( [0] => Boat [1] => Airplane [2] => Car )
[_value:private] => 1500 )
Actual result:
--------------
Verification.php outputs :
Foo Session Variable :
foo Object ( [_bar:private] => [_names:private] => [_value:private] =>
1500 )
--
Edit bug report at http://bugs.php.net/?id=35557&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=35557&r=trysnapshot44
Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=35557&r=trysnapshot51
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=35557&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=35557&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=35557&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=35557&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=35557&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=35557&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=35557&r=support
Expected behavior: http://bugs.php.net/fix.php?id=35557&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=35557&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=35557&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=35557&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=35557&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=35557&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=35557&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=35557&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=35557&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=35557&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=35557&r=mysqlcfg
Thread (6 messages)
- fcardinaux at gmail dot com