#23744 [Asn]: $_REQUEST no more includes $_GET variables?

From: Date: Wed, 21 May 2003 22:49:06 +0000
Subject: #23744 [Asn]: $_REQUEST no more includes $_GET variables?
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-40170@lists.php.net to get a copy of this message
ID: 23744 Updated by: rasmus@php.net Reported By: i dot thierack at iwt-promotion dot net Status: Assigned Bug Type: URL related Operating System: Debian 3.0 PHP Version: 4.3.2RC3 Assigned To: iliaa New Comment: This may very well be a "Won't Fix" but we will see what Ilia thinks. This has traditionally not worked very reliably. PHP has always expected to see valid variable names in the get and post key/value pairs. For example, try putting a . (dot) in a variable name. You will see it gets converted to an underscore. The idea here is that anything in $_GET/$_POST/$_COOKIE can be extract()'ed directly into the symbol table and you can't have variables called $123 and $.abc so these variable names are technically not supported in our GPC arrays. That doesn't mean you can't use them, you will just have to do a bit of work yourself. In your case you would need to look at $QUERY_STRING and parse that. Previous Comments: ------------------------------------------------------------------------ [2003-05-21 17:38:37] michael dot mauch at gmx dot de The problem appears only with numeric argument names: test.php?123=45 => _REQUEST: Array ( [0] => 45 ) _GET: Array ( [123] => 45 ) test.php?a123=45 => _REQUEST: Array ( [a123] => 45 ) _GET: Array ( [a123] => 45 ) ------------------------------------------------------------------------ [2003-05-21 16:59:06] sniper@php.net This was broken by another fix related to $_REQUEST. Assigned to Ilia who broke it. :) ------------------------------------------------------------------------ [2003-05-21 16:20:31] i dot thierack at iwt-promotion dot net Hello, following problem with 4.3.2RC3 (it works with 4.3.1) Browser URL : http://intraddms/fiatbearb/adr_index.php?1234567890 var_dump from $_REQUEST array(2) { [0]=> string(1) "0" ["PHPSESSID"]=> string(32) "3f8ee06297a919da9d84cd713473fe5d" } if have a query like if(!isset($_REQUEST["1234567890"]){ << BUG? it's alway true initialize some variables } if i replace it with $_GET it works. Switch back to 4.3.1 it works also with $_REQUEST regards Ingo Thierack ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=23744&edit=1

« previous php.bugs (#40170) next »