PHP 4.0 Bug #7530 Updated: Session does not store Objects

From: Date: Tue, 28 Nov 2000 11:34:39 +0000
Subject: PHP 4.0 Bug #7530 Updated: Session does not store Objects
Groups: php.dev 
Request: Send a blank email to php-dev+get-39375@lists.php.net to get a copy of this message
ID: 7530 User Update by: ori@chikki.net Status: Closed Bug Type: *Session related Description: Session does not store Objects I checked the latest release from snaps.php.net (php4-200011280245) and it seems to fix the bug problem with the sessions. I then checked again with 4.0.3pl1 and it did not work properly - seems like you fixed the bug... Ori Previous Comments: --------------------------------------------------------------------------- [2000-11-27 13:46:46] waldschrott@php.net ori, if you check it again, don't use your script supplied in this bug report, there are errors in it... 1) $SESSION["Counter"]->add(); works for me too --------------------------------------------------------------------------- [2000-11-27 08:51:03] 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 --------------------------------------------------------------------------- [2000-11-27 08:50:54] 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 --------------------------------------------------------------------------- [2000-11-01 07:12:10] ori@chikki.net The entire script I used is long - here is a summary: <? class Counter { var $counter; function add() { return $this->counter++; } } session_start(); session_register("SESSION"); /* initialise the SESSION variable if necessary */ if (!isset($SESSION)) { $SESSION = array(); } /* initialise the Counter objct if necessary */ if (!isset($SESSION["Counter"])) { $SESSION["Counter"] = new Counter; } echo "Visits using normal variables: " . $SESSION["visit"]++; echo "<BR>"; echo "Visits using classes: " . $SESSION["counter"]->add; ?> Ori --------------------------------------------------------------------------- [2000-11-01 06:59:59] andi@php.net Can you create a small reproducing script? That would help out a lot. --------------------------------------------------------------------------- The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online. Full Bug description available at: http://bugs.php.net/?id=7530

« previous php.dev (#39375) next »