]> granicus.if.org Git - php/commit
Nuke PS(vars), we keep the state of registered session variables now
authorSascha Schumann <sas@php.net>
Thu, 3 Oct 2002 03:23:02 +0000 (03:23 +0000)
committerSascha Schumann <sas@php.net>
Thu, 3 Oct 2002 03:23:02 +0000 (03:23 +0000)
commitb9077e5a9de74faab97c1f671fed0934537a7b2b
tree1aee6ae4a073700063408bcde8abac989f92a125
parentbec4574f575a4536320da5753fa1221368947534
Nuke PS(vars), we keep the state of registered session variables now
completely in PS(http_session_vars). This avoids bugs which are caused
by a lack of synchronization between the two hashes. We also don't need
to worry about prioritizing one of them.

Add session.bug_compat_42 and session.bug_compat_warn which are enabled
by default. The logic behind bug_compat_42:

IF bug_compat_42 is on, and
IF register_globals is off, and
IF any value of $_SESSION["key"] is NULL, and
IF there is a global variable $key, then
$_SESSION["key"] is set to $key.

The extension emits this warning once per script, unless told otherwise.

"Your script possibly relies on a session side-effect which existed until
PHP 4.2.3. Please be advised that the session extension does not consider
global variables as a source of data, unless register_globals is enabled.
You can disable this functionality and this warning by setting
session.bug_compat_42 or session.bug_compat_warn.
ext/session/php_session.h
ext/session/session.c