From:             [EMAIL PROTECTED]
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

Reply via email to