php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #7407 Session variables appear to get corrupted
Submitted: 2000-10-23 07:51 UTC Modified: 2000-10-27 05:38 UTC
From: thomas at unifiedconsulting dot com Assigned:
Status: Closed Package: Session related
PHP Version: 4.0.3pl1 OS: Redhat 6.2 kernel 2.2.14-5.0
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 you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: thomas at unifiedconsulting dot com
New email:
PHP Version: OS:

 

 [2000-10-23 07:51 UTC] thomas at unifiedconsulting dot com
This bug occurs in 4.0.3 or 4.0.3pl1 but not in lower 4.0.x versions. 
My eCommerce site at www.linuxboxen.com uses a cart object with arrays to store the actual products in the cart. The cart object is registered as a session variable in virtually every script. When using 4.0.3 or 4.0.3pl1, the arrays in the object appear to become corrupted after adding more than 2 items with the syntax
$cartcontents[]=$newitem;
Where $newitem is an array with $newitem[0]=an object and $newitem[1]=a number

Specifically, the first item in cartcontents seems to become unset, although count($cartcontents) will still report the correct number.

Sorry I can't be more detailed in this report; the code is pretty long. If you contact me at thomas@unifiedconsulting.com I can temporarily install 4.0.3 to demonstrate the bug.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-10-27 05:38 UTC] sas@php.net
The change which caused this has been reverted. Thanks for your report.
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Sun Oct 11 16:00:02 2026 UTC