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

From: Date: Fri, 03 Nov 2000 16:55:38 +0000
Subject: PHP 4.0 Bug #7256 Updated: Different behaviour for 'global $HTTP_POST_VARS; isset($HTTP_POST_VARS)'
Groups: php.dev 
Request: Send a blank email to php-dev+get-36981@lists.php.net to get a copy of this message
ID: 7256 Updated by: derick Reported By: hara@oderwat.de Status: Closed Bug Type: Scripting Engine problem Assigned To: Comments: It is intended behavior: (As is shown in the bug report update below): ID: 7611 Updated by: zeev Reported By: tkruthoff@absolutebackgrounds.com Status: Closed Bug Type: Feature/Change Request Assigned To: Comments: Yes, it is intended (in order to prevent remote users from injecting information into HTTP_POST_VARS) Previous Comments: --------------------------------------------------------------------------- [2000-11-03 11:32:38] hara@oderwat.de I still think that this is a problem! I wonder if anyone can at least answer the question... --------------------------------------------------------------------------- [2000-10-16 14:34:01] hara@oderwat.de 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 --------------------------------------------------------------------------- Full Bug description available at: http://bugs.php.net/?id=7256

« previous php.dev (#36981) next »