#41302 [NEW]: Class properties in $_SESSION cause whole class to be included
| From: | gerard dot payne at nellies dot jp | Date: | Sun, 06 May 2007 08:09:53 +0000 |
| Subject: | #41302 [NEW]: Class properties in $_SESSION cause whole class to be included | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-112304@lists.php.net to get a copy of this message | ||
From: gerard dot payne at nellies dot jp
Operating system: Red Hat
PHP version: 4.4.7
PHP Bug Type: Scripting Engine problem
Bug description: Class properties in $_SESSION cause whole class to be included
Description:
------------
When trying to store class property values in $_SESSION the whole class is
put into session.
Reproduce code:
---------------
for($i=0; $i <= $this->numItems;$i++){
$_SESSION['cart']['numItems'] = $this->numItems;
$_SESSION['cart']['items'][$i]['isbn'] =
$this->items[$i]['isbn'];
$_SESSION['cart']['items'][$i]['quantity'] =
$this->items[$i]['quantity'];
}
Expected result:
----------------
Array
(
[numItems] => 1
[items] => Array
(
[1] => Array
(
[isbn] => BR15609
[quantity] => 1
)
)
)
Actual result:
--------------
Array
(
[cart] => shoppingcart Object
(
[numItems] => 1
[items] => Array
(
[1] => Array
(
[isbn] => BR15609
[quantity] => 1
)
)
)
)
--
Edit bug report at http://bugs.php.net/?id=41302&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=41302&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=41302&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=41302&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=41302&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=41302&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=41302&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=41302&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=41302&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=41302&r=support
Expected behavior: http://bugs.php.net/fix.php?id=41302&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=41302&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=41302&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=41302&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=41302&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=41302&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=41302&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=41302&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=41302&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=41302&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=41302&r=mysqlcfg