Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.0.0b4

Bug #7499 Error in HTTP_Upload::isMissing() on determining uploaded files
Submitted: 2006-04-27 08:27 UTC
From: alpaxo at aiken dot com dot ua Assigned: wenz
Status: Closed Package: HTTP_Upload (version CVS)
PHP Version: Irrelevant OS: any
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


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:
MUST BE VALID
Solve the problem : 36 - 21 = ?

 
 [2006-04-27 08:27 UTC] alpaxo at aiken dot com dot ua (Alexey)
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'];

Comments

 [2006-12-01 11:29 UTC] wenz (Christian Wenz)
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better. thanks!