php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #32212 vrana
Submitted: 2005-03-07 02:56 UTC Modified: 2005-03-14 21:33 UTC
From: gardan at gmx dot net Assigned: vrana (profile)
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS: -
Private report: No CVE-ID: None
 [2005-03-07 02:56 UTC] gardan at gmx dot net
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.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-03-07 05:39 UTC] philip@php.net
What bug from 2002 are you talking about?
 [2005-03-07 11:34 UTC] vrana@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.


 [2005-03-14 21:33 UTC] gardan at gmx dot net
philip@php.net: Was reported as Bug #20402
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Nov 19 09:00:01 2025 UTC