#25589 [Opn->WFx]: Problem with the Structure of $_FILES

From: Date: Fri, 19 Sep 2003 00:16:36 +0000
Subject: #25589 [Opn->WFx]: Problem with the Structure of $_FILES
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-47797@lists.php.net to get a copy of this message
 ID:               25589
 Updated by:       sniper@php.net
 Reported By:      lakario at msn dot com
-Status:           Open
+Status:           Wont fix
-Bug Type:         Unknown/Other Function
+Bug Type:         Feature/Change Request
 Operating System: All
 PHP Version:      4.3.3
 New Comment:

This will not be changed due to backwards compatibility issues.



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

[2003-09-18 10:34:29] lakario at msn dot com

Description:
------------
>The default format for $_FILES is $_FILES['variable']['element'] which
of course works fine, following this format I would assume that the
format for a variable inside an array would be
$_FILES['array']['variable']['element'] but on the contrary it is in
fact $_FILES['array']['element']['variable'].  Somehow this
doesn't
seem quite right to me.  Granted, it still works just as well but it
sort of breaks the traditional naming structure for an array and really
jumbles the logical flow of things.

Reproduce code:
---------------
This is basically formality and really doesn't need to be hear at all,
but here you go; a sample HTML form that will produce the error:

<form action="blah" method="post">
<input type="file" name="array[file]">
<input type="submit" name="" value="Submit">
</form>

Expected result:
----------------
The form ideally should send back the file contained within $_FILES as
$_FILES['array']['file']['element'].

Actual result:
--------------
The form in fact sends back the file contained in $_FILES as
$_FILES['array']['element']['file'].


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


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


Thread (2 messages)

« previous php.bugs (#47797) next »