Bug #2626: Incorrectly sets upload file variables when file name variable is in an array
| From: | c_stach at yahoo dot com | Date: | Wed, 27 Oct 1999 22:53:35 +0000 |
| Subject: | Bug #2626: Incorrectly sets upload file variables when file name variable is in an array | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-11969@lists.php.net to get a copy of this message | ||
From: c_stach@yahoo.com
Operating system: Linux (RedHat 6.1)
PHP version: 3.0.12
PHP Bug Type: Other
Bug description: Incorrectly sets upload file variables when file name variable is in an array
When using an HTTP form to upload files PHP incorrectly sets the <variable>_size,
<variable>_type, and neglects to set <variable>_name variables when <variable> is
in the format of an array (eg, "userfile[$index]" which would expand to something like
"userfile[3]"). What actually ends up happening, for example, is userfile[3]_name is not
ever set, userfile[3]_type is set correctly, and userfile_size is set to the last encountered size
value instead of userfile[3]_size.
Beyond this problem, I ran into another issue with this. PHP seemingly incorrectly parses out,
for example, a variable in the format "$userfile[$id]_name" which led me to have to do
"${userfile[$id]_name"} instead to get around the constraints of the parser.