|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #6499 $upload_type[] has wrong size with empty multiple-file uploads
Submitted: 2000-09-02 04:49 UTC Modified: 2001-12-18 09:36 UTC
From: daniel dot burckhardt at sur-gmbh dot ch Assigned:
Status: Closed Package: HTTP related
PHP Version: 4.0.1pl2 OS: Win NT
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
36 - 24 = ?
Subscribe to this entry?

 [2000-09-02 04:49 UTC] daniel dot burckhardt at sur-gmbh dot ch
when i'm using multiple file uploads and leave some of the fields empty,
then i get
  sizeof($upload) > sizeof($upload_type);
(i assume that the problem is that $upload_type[] is not set to an empty string ""
 for files with $upload_size[$i] == 0)

so if i a have an upload form with 2 upload entries, and i leave the first one blank,
then sizeof($upload) == 2 and sizeof($upload_type) == 1 which means that
the type for  $upload[1] is in the variable $upload_type[0]


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2000-11-20 09:11 UTC]
This is what would be expected but is not good behaviour. This happens due to the first $upload_type is set to null, when an array value is null it is removed from an array. I think in this case it needs fixing.

 [2001-11-27 05:37 UTC]
Does this problem stil occur with the latest CVS (which has IIRC a new upload-system)??? (You also might try 4.0.6 or the latest RC (
 [2001-12-18 07:14 UTC]
No feedback. Closing.
 [2001-12-18 09:36 UTC] daniel dot burckhardt at sur-gmbh dot ch
doesn't occur anymore in php 4.1.0 on Win NT
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon May 27 23:01:30 2024 UTC