Home » HTTP » HTTP_Upload » Bug #7499
Error in HTTP_Upload::isMissing() on determining uploaded files
Details
| Submitted | 2006-04-27 08:27 UTC |
|---|---|
| From | alpaxo at aiken dot com dot ua |
| Assigned | wenz |
| Status | Closed |
| Package | HTTP_Upload |
| PHP Version | Irrelevant |
| OS | any |
| Roadmaps | (Not assigned) |
Comments
[2006-04-27 08:27 UTC] alpaxo at aiken dot com dot ua
Description:
------------
Description:
------------
// $Id: Upload.php,v 1.54 2006/04/06 08:43:58 wenz Exp $
Error in HTTP_Upload::isMissing() on determining uploaded files on l.526-529:
} else { //one file
$size = $value['size'];dump($value);
$error = $value['error'];
}
If we have 2 file in $this->post_files, for example:
array(11) {
["p58i0"]=>
array(5) {
["name"]=>
string(23) "test.jpg"
["type"]=>
string(10) "image/jpeg"
["tmp_name"]=>
string(15) "/tmp\php21A.tmp"
["error"]=>
int(0)
["size"]=>
int(29867)
}
["p58i1"]=>
array(5) {
["name"]=>
string(0) ""
["type"]=>
string(0) ""
["tmp_name"]=>
string(0) ""
["error"]=>
int(4)
["size"]=>
int(0)
}
}
then values of p58i0 will be overwritten by p58i1, as result - having $this->raiseError('NO_USER_FILE');
Possible solution:
1. l.526:
}else{
replace with
}elseif(!empty($value['name'])){
2. l.527
$size = $value['size'];
replace with
$size += $value['size'];