Bug #14364 Updated: Unable to clear out an individual variable in a session
| From: | info at somnioworld dot com | Date: | Fri, 07 Dec 2001 03:08:11 +0000 |
| Subject: | Bug #14364 Updated: Unable to clear out an individual variable in a session | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-72819@lists.php.net to get a copy of this message | ||
ID: 14364
User updated by: info@somnioworld.com
Reported By: info@somnioworld.com
Status: Closed
Bug Type: Session related
Operating System: FreeBSD 4.2
PHP Version: 4.1.0
New Comment:
We downloaded and installed the CVS version today (version 4.2) and we are still having the same
issue.
Previous Comments:
------------------------------------------------------------------------
[2001-12-06 17:12:14] derick@php.net
No worries! It's already fixed in CVS.
------------------------------------------------------------------------
[2001-12-06 17:05:13] info@somnioworld.com
Sample script:
// script to create session variable
session_start();
session_register("objectA");
$objectA = new classA();
// script to unset session variable
session_start();
session_unregister("objectA");
unset($objectA);
// script to test for session variable
session_start();
if(isset($objectA))
{
echo "TEST PASSED";
}
Doing a session_destroy() then unset() of all the session variables seems to work, but in the above
code I wish to just unset() a single variable in the session but keep the session and the remaining
variables alive.
------------------------------------------------------------------------
[2001-12-06 14:45:25] derick@php.net
Fixed in CVS. BTW, 4.1.0 does not exist yet, so how can you report a bug for it?
This fix will be in the 4.1.0 release.
Derick
------------------------------------------------------------------------
[2001-12-06 14:44:09] jan@php.net
Can you provide the shortest sample script, that reproduce that bug?
------------------------------------------------------------------------
[2001-12-06 14:40:30] info@somnioworld.com
There appears to be an issue with unsetting variables in a session. I have an object variable that
is stored in the session and when I attempt to unset the value via unset(object) and
session_unregister(object) and test if(isset(object)) to see if it is set in a seperate script the
test passes. In PHP 4.05 I did not encounter this problem.
------------------------------------------------------------------------
Edit this bug report at http://bugs.php.net/?id=14364&edit=1