Mombu the Php Forum sponsored links

Go Back   Mombu the Php Forum > Php > #35557 : Non-scalar properties of objects stored in session variables aren't kept
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 12th June 13:09
php-bugs@lists.php.net (fcardinaux at gmail dot
External User
 
Posts: 1
Default #35557 : Non-scalar properties of objects stored in session variables aren't kept



ID: 35557
User updated by: fcardinaux at gmail dot com
Reported By: fcardinaux at gmail dot com
-Status: Feedback
+Status: Open
Bug Type: Session related
Operating System: Windows XP Pro
PHP Version: 5CVS-2005-12-05 (snap)
New Comment:

I'm sorry, but it seems that this bug can't reproduce within a single
script. Three php files are necessary : a class definition file
(class.php, 61 lines), a start page (index.php, 47 lines) that links to
a verification page (verification.php, 24 lines), where the bug appears.


These files are enclosed in the archive
http://www.cardinaux.info/session_problem_with_php_5_1_2_dev.zip.


Previous Comments:
------------------------------------------------------------------------

[2005-12-05 18:07:18] tony2001@php.net

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves.

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external
resources such as databases, etc.

If possible, make the script source available online and provide
an URL to it here. Try to avoid embedding huge scripts into the report.

------------------------------------------------------------------------

[2005-12-05 16:43:37] fcardinaux at gmail dot com

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:
---------------
http://www.cardinaux.info/session_problem_with_php_5_1_2_dev.zip

Expected result:
----------------
Verification.php should output :

Foo Session Variable :
foo Object ( [_barrivate] => bar Object ( [_valuerivate] => 54321 )
[_namesrivate] => Array ( [0] => Boat [1] => Airplane [2] => Car )
[_valuerivate] => 1500 )


Actual result:
--------------
Verification.php outputs :

Foo Session Variable :
foo Object ( [_barrivate] => [_namesrivate] => [_valuerivate] =>
1500 )

------------------------------------------------------------------------


--
Edit this bug report at http://bugs.php.net/?id=35557&edit=1
  Reply With Quote


  sponsored links


Reply


Thread Tools
Display Modes




Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666