From: gardan at gmx dot net
Operating system: -
PHP version: Irrelevant
PHP Bug Type: Documentation problem
Bug description: $_FILES with arrays
Description:
------------
Using a form with input name like name="foo[]" this is what is returned
for files:
$_FILES = array(1) {
["foo"]=>
array(5) {
["name"]=>
array(2) {
[0]=>
string(0) ""
[1]=>
string(0) ""
}
["type"]=>
array(2) {
[0]=>
string(0) ""
[1]=>
string(0) ""
}
[...snip...]
}
}
Expected:
$_FILES = array(1) {
["foo"]=>
array(2) {
[0]=>
array(5) {
[name]=>
string(0) ""
[type]=>
string(0) ""
[...snip...]
}
[1]=>
array(5) {
[0]=>
string(0) ""
[1]=>
string(0) ""
[...snip...]
}
}
}
This being highly unintuitive, though in a bug report from 2002 closed as
"won't change", should be documented.
--
Edit bug report at http://bugs.php.net/?id=32212&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=32212&r=trysnapshot4
Try a CVS snapshot (php5.0):
http://bugs.php.net/fix.php?id=32212&r=trysnapshot50
Try a CVS snapshot (php5.1):
http://bugs.php.net/fix.php?id=32212&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=32212&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=32212&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=32212&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=32212&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=32212&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=32212&r=support
Expected behavior: http://bugs.php.net/fix.php?id=32212&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=32212&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=32212&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=32212&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=32212&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=32212&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=32212&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=32212&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=32212&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=32212&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=32212&r=mysqlcfg