ID:               36907
 Updated by:       [EMAIL PROTECTED]
 Reported By:      olaf at 7val dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         Variables related
 Operating System: Linux
 PHP Version:      5.1.2
 New Comment:

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

No, the manual describes exactly what you are getting.  Go read it
again.


Previous Comments:
------------------------------------------------------------------------

[2006-03-29 15:30:34] olaf at 7val dot com

I checked the documentation an I am sure this actually _is_ a bug!

According to documentation:

<input name="file[a][b][c]" size="25" accept="*/*" type="file">

should give
$_FILES[a][b][c]['name'] = [uploaded_file_name]

------------------------------------------------------------------------

[2006-03-29 13:58:25] [EMAIL PROTECTED]

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php



------------------------------------------------------------------------

[2006-03-29 09:29:08] olaf at 7val dot com

Description:
------------
When using input elements with names like  "file[a][b][c]" the $_FILES
Array is broken.

With more than one input element it get even worse!

Reproduce code:
---------------
<html><head>
<title>Test</title>
</head>
<body>
<pre>
<?PHP 
print_r($_FILES);
?>
</pre>
<form name="form1" enctype="multipart/form-data" method="post" ><input
name="file[a][b][c]" size="25" accept="*/*" type="file">
<input type="submit" value="OK" name="submit">
</form>
</body>
</html>

Expected result:
----------------
Array
(
    [file] => Array
           (
          [a] => Array
                        (
                                  [b] => Array 
                                     (
                                           [c] => Array 
                                             (
                                                  [name] => dsc00051.jpg
                                                  [type] => image/jpeg
                                                  [tmp_name] => /tmp/phpL3mhkD
                                                  [error] => 0
                                                  [size] => 56484
                                                 )
                                         )
                                )
        )
)


Actual result:
--------------
Array
(
    [file] => Array
        (
            [name] => Array
                (
                    [a] => Array
                        (
                            [b] => Array
                                (
                                    [c] => dsc00051.jpg
                                )

                        )

                )

            [type] => Array
                (
                    [a] => Array
                        (
                            [b] => Array
                                (
                                    [c] => image/jpeg
                                )

                        )

                )

            [tmp_name] => Array
                (
                    [a] => Array
                        (
                            [b] => Array
                                (
                                    [c] => /tmp/php2W1O7R
                                )

                        )

                )

            [error] => Array
                (
                    [a] => Array
                        (
                            [b] => Array
                                (
                                    [c] => 0
                                )

                        )

                )

            [size] => Array
                (
                    [a] => Array
                        (
                            [b] => Array
                                (
                                    [c] => 56484
                                )

                        )

                )

        )

)


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=36907&edit=1

Reply via email to