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

Bug #8656 getFiles() generate error if one of uploaded files haven't been selected
Submitted: 2006-09-07 15:55 UTC
From: s dot kornev at gmail dot com Assigned: wenz
Status: Closed Package: HTTP_Upload (version CVS)
PHP Version: 4.3.0 OS: WinXP
Roadmaps: (Not assigned)    
Subscription  


 [2006-09-07 15:55 UTC] s dot kornev at gmail dot com (Sergei)
Description: ------------ Getting error if one of submitted files haven't been selected Upload error: You haven't selected any file for uploading. Test script: --------------- <?php /** * strings 443 - 450 should be patched with this code */ // In 4.1 $_FILES isn't initialized when no uploads // XXX (cox) afaik, in >= 4.1 and <= 4.3 only if (function_exists('version_compare') && version_compare(phpversion(), '4.1', 'ge') && version_compare(phpversion(), '4.3', 'le')) { $error = $this->isMissing(); if (PEAR::isError($error)) { return $error; } } ?> Expected result: ---------------- no errors Actual result: -------------- Upload error: You haven't selected any file for uploading.

Comments

 [2006-09-07 16: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 for the report! I changed your suggestion by version_compare'ing "< 4.4", I think that should do. Please report back if that does not work for you.
 [2006-09-07 17:55 UTC] s dot kornev at gmail dot com
It doesnt' work for. Cause on NT 5.1(XP) and PHP 4.30 $_FILES is initialized. so patch should be something like if (function_exists('version_compare') && version_compare(phpversion(), '4.1', 'ge') && version_compare(phpversion(), '4.3', 'le')) as I ve written before. thanks.
 [2006-09-07 18:03 UTC] s dot kornev at gmail dot com
changes to bug state open
 [2006-09-08 05:56 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. > version_compare(phpversion(), '4.3', 'le') well, this would also cover version 4.3. I applied a patch that does _not_ cover 4.3.