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  
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 : 21 - 15 = ?

 
 [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.