#41110 [NEW]: Filter extension doesn't allow GET/POST array parameters
| From: | mauroi at digbang dot com | Date: | Tue, 17 Apr 2007 02:51:21 +0000 |
| Subject: | #41110 [NEW]: Filter extension doesn't allow GET/POST array parameters | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-111576@lists.php.net to get a copy of this message | ||
From: mauroi at digbang dot com
Operating system: Linux & Windows
PHP version: 5.2.1
PHP Bug Type: Filter related
Bug description: Filter extension doesn't allow GET/POST array parameters
Description:
------------
I'm trying to use an old way of sending arrays between pages in PHP with
the new filter extension. With normal superglobals if you append '[]' after
a parameter's name, you get an array with one element for each aparence.
Eg,
http://localhost/foo.php?a[]=1&a[]=2
results in an array with two positions in $_GET['a'].
I'm not being able to emulate this behavior with the filter extension.
Reproduce code:
---------------
<pre>
<?
var_dump($_GET['a']);
var_dump(filter_input(INPUT_GET, 'a', FILTER_DEFAULT))
?>
</pre>
Expected result:
----------------
array(2) {
[0]=>
string(1) "1"
[1]=>
string(1) "2"
}
array(2) {
[0]=>
string(1) "1"
[1]=>
string(1) "2"
}
Actual result:
--------------
array(2) {
[0]=>
string(1) "1"
[1]=>
string(1) "2"
}
bool(false)
--
Edit bug report at http://bugs.php.net/?id=41110&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=41110&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=41110&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=41110&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=41110&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=41110&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=41110&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=41110&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=41110&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=41110&r=support
Expected behavior: http://bugs.php.net/fix.php?id=41110&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=41110&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=41110&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=41110&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=41110&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=41110&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=41110&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=41110&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=41110&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=41110&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=41110&r=mysqlcfg