PHP 4.0 Bug #6161 Updated: Global variable acts strangely

From: Date: Tue, 15 Aug 2000 13:22:22 +0000
Subject: PHP 4.0 Bug #6161 Updated: Global variable acts strangely
Groups: php.dev 
Request: Send a blank email to php-dev+get-28916@lists.php.net to get a copy of this message
ID: 6161 Updated by: waldschrott Reported By: andrew@andrew.org Status: Analyzed Bug Type: Session related Assigned To: Comments: Xou´re right, that seems to be a bug, the manual says: "If both track_vars and register_globals are enabled, then the globals variables and the $HTTP_SESSION_VARS entries will reference the same value." Thus a variable made global a before session_start()´s should be update accordingly, anyway I´ll propose you to set "register_global" off and access all variables directly throught $HTTP_*_VARS that´ll protect you from such shortcomings but will force you to be more disciplined acting with variables... Full Bug description available at: http://bugs.php.net/?id=6161

« previous php.dev (#28916) next »