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

Request #8329 unnecessary if-else
Submitted: 2006-07-31 13:46 UTC
From: yoghoyogho at fastmail dot fm Assigned: avb
Status: Closed Package: HTML_QuickForm (version 3.2.6)
PHP Version: 5.1.2 OS:
Roadmaps: (Not assigned)    
Subscription  


 [2006-07-31 13:46 UTC] yoghoyogho at fastmail dot fm (Yuri)
Description: ------------ See http://cvs.php.net/viewvc.cgi/pear/HTML_QuickForm/QuickForm/file.php?revision=1.20&view=markup There's an unnecessary if-else block in the method moveUploadedFile. The return value is a boolean, based on a boolean value from move_uploaded_file. Test script: --------------- I would replace: if (move_uploaded_file($this->_value['tmp_name'], $dest . $fileName)) { return true; } else { return false; } with: return move_uploaded_file($this->_value['tmp_name'], $dest . $fileName); See also http://www.php.net/move_uploaded_file for the possible return values (they're all boolean)

Comments

 [2006-10-07 15:11 UTC] avb (Alexey Borzov)
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.