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] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!