Bug #15645: session_unset() undefines non-session variables?

From: Date: Wed, 20 Feb 2002 13:30:20 +0000
Subject: Bug #15645: session_unset() undefines non-session variables?
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-663@lists.php.net to get a copy of this message
From: yannick@i4music.net Operating system: Redhat 7.1 PHP version: 4.1.1 PHP Bug Type: Session related Bug description: session_unset() undefines non-session variables? 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 bug report at http://bugs.php.net/?id=15645&edit=1 -- Fixed in CVS: http://bugs.php.net/fix.php?id=15645&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=15645&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=15645&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=15645&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=15645&r=support Expected behavior: http://bugs.php.net/fix.php?id=15645&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=15645&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=15645&r=submittedtwice

« previous php.bugs (#663) next »