|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-02-21 03:12 UTC] yohgaki@php.net
[2002-02-21 03:46 UTC] yannick at i4music dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Nov 27 20:00:01 2025 UTC |
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.