PHP 4.0 Bug #7256: Different behaviour for 'global $HTTP_POST_VARS; isset($HTTP_POST_VARS)'

From: Date: Mon, 16 Oct 2000 18:34:01 +0000
Subject: PHP 4.0 Bug #7256: Different behaviour for 'global $HTTP_POST_VARS; isset($HTTP_POST_VARS)'
Groups: php.dev 
Request: Send a blank email to php-dev+get-35178@lists.php.net to get a copy of this message
From: hara@oderwat.de Operating system: Linux SuSE 6.3 - Apache 1.3.9 PHP version: 4.0.3pl1 PHP Bug Type: Scripting Engine problem Bug description: Different behaviour for 'global $HTTP_POST_VARS; isset($HTTP_POST_VARS)' Hi! After installing 4.0.3pl1 some of my scripts are broken because of a different behaviour with the following code: <?php function test() { global $HTTP_POST_VARS; if(isset($HTTP_POST_VARS)) print "set"; else print "unset"; } test(); ?> On php-4.0.2 this script prints "unset" (if it was not a post reguest to the server) on php-4.0.3 the same script always prints "set" In comparison: <?php function test() { if(isset($GLOBAlS["HTTP_POST_VARS"])) print "set"; else print "unset"; } test(); ?> works as espected by me... Was I relaying on some site effekt or is there something wrong now in 4.0.3pl1 Sincerely, Hans Raaf -- Edit Bug report at: http://bugs.php.net/?id=7256&edit=1

« previous php.dev (#35178) next »