Bug #15645 Updated: session_unset() undefines non-session variables?
| From: | yannick at i4music dot net | Date: | Thu, 21 Feb 2002 08:46:18 +0000 |
| Subject: | Bug #15645 Updated: session_unset() undefines non-session variables? | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-712@lists.php.net to get a copy of this message | ||
ID: 15645
Updated by: yannick@i4music.net
Reported By: yannick@i4music.net
Status: Closed
Bug Type: Session related
Operating System: Redhat 7.1
PHP Version: 4.1.1
New Comment:
Ok. Sorry, but I couldn't check with the CVS version, since it was on a
"production" server.
Previous Comments:
------------------------------------------------------------------------
[2002-02-21 03:12:31] yohgaki@php.net
This bug has been fixed in CVS.
Thanks for reporting, but I think this is fixed by Sterling.
------------------------------------------------------------------------
[2002-02-20 08:30:20] yannick@i4music.net
session_unset() seems to undefine non-session variables. It happens
with register_globals = off. It seems to behave just like if
register_globals was on.
Example:
$domain = $_REQUEST["domain"];
if ($domain){
echo $domain; // correct
session_start();
session_unset();
echo $domain; // empty
$_SESSION["domain"] = $domain;
};
So the problem seem to be: if a previous session variable is named
"abc" (thus $_SESSION["abc"]), session_unset() will clear
$_SESSION["abc"] but also the variable $abc which should not be in
relation with it since register_globals is off.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=15645&edit=1