php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #7502 Objects getting deleted in session
Submitted: 2000-10-28 01:02 UTC Modified: 2000-11-27 08:40 UTC
From: jamie dot php at avatopia dot com Assigned:
Status: Closed Package: Session related
PHP Version: 4.0.3pl1 OS: Linux
Private report: No CVE-ID: None
 [2000-10-28 01:02 UTC] jamie dot php at avatopia dot com
class Payment {
   var  $MyVar;

   function DoNothing () {
   }
}

class Report {
   var Payments         // Payment Object

  function Report () {
     // Initialize payments object
     Payments = new Payment;
  }
}

Script on Page 1:
     session_start();

     $Report = new Report;
     // Report now contains instance of Payment object 

     session_register(Report);

     $Report->Payments->DoNothing();   // Call ANY function

     header("Location: ../Php/Page2.php");

Script on Page 2:
     session_start();
     
     echo $Report->Payments;   // This says that Payments is a non-object.
     // Any non-object members of $Report are OK.  Only child objects seem to be affected.

If function call to $Report->Payments->DoNothing() is removed from page 1 then things work OK

Our same code under 4.0.1pl2 works fine.  We noticed the problem only when we upgraded to 4.0.3pl1

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-11-27 08:40 UTC] sniper@php.net
Should be fixed in CVS. Please try latest snapshot from
http://snaps.php.net/ and reopen this bug report if 
this doesn't work with it.

--Jani
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun May 05 11:01:33 2024 UTC