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

Bug #2291 typo in example and wrong return result of _evalValidExtensions()
Submitted: 2004-09-06 14:42 UTC
From: volker dot buzek at rrze dot uni-erlangen dot de Assigned: antonio
Status: Closed Package: HTTP_Upload
PHP Version: 5.0.1 OS: Solaris 9
Roadmaps: (Not assigned)    
Subscription  


 [2004-09-06 14:42 UTC] volker dot buzek at rrze dot uni-erlangen dot de
Description: ------------ {PEAR}/HTTP_Upload/docs/upload_example.php Check for GET "submit" var, but form is submitted via POST: line 2: <form [...] method="post" enctype="multipart/form-data"> ^^^^ line 14: if (!isset($_GET["submit"])) { ^^^^^^^^^^ {PEAR}/HTTP_Upload/ Upload.php line 868: return false; ^^^^ function _evalValidExtensions() needs to return true if mode==accept and the supplied extension array is _not_ found in $this->getProp('ext') Reproduce code: --------------- $file->setValidExtensions(array("png","PNG"),"accept"); $return = $file->_evalValidExtensions(); /* $retrun == FALSE if file with extension .png was supplied */ Expected result: ---------------- $file->setValidExtensions(array("png","PNG"),"accept"); $return = $file->_evalValidExtensions(); /* $retrun == TRUE if file with extension .png was supplied */ Actual result: -------------- $file->setValidExtensions(array("png","PNG"),"accept"); $return = $file->_evalValidExtensions(); /* $retrun == FALSE if file with extension .png was supplied */

Comments

 [2004-09-14 12:31 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!
 [2004-09-15 06:33 UTC] volker dot buzek at rrze dot uni-erlangen dot de
with latest CVS: 1) verified and working, already prior to current CVS - overlooked the variable appended to the URL in the action attribute 2) verified and working