Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Cannot Reproduce
-
Affects Version/s: 1.7.2
-
Fix Version/s: None
-
Component/s: Zend_File_Transfer, Zend_Form
-
Labels:None
Description
There is a bug in Zend_Form_Element_File class.
If you are want to upload a file, you get back a error message.
You get it back every time and no upload will be finished.
Here is my code from a form:
$foo = new Zend_Form_Element_File('foo');
$foo->setLabel('Choose a image:')
->setDestination("/var/www/zend_quick/public");
$foo->addValidator('Extension', false, 'jpg,png,gif');
$this->addElement($foo);
from the controller:
if($this->getRequest()->isPost() == true) {
if (!$form->foo->receive()) {
print "error";
}
}
then I get back some error messages.
1.) The file '' was not found
2.) Notice: Undefined index: tmp_name in /usr/share/php/libzend-framework-php/Zend/File/Transfer/Adapter/Abstract.php on line 589
3.)Notice: Undefined index: name in /usr/share/php/libzend-framework-php/Zend/Validate/File/Extension.php on line 228
best regards
anno
Issue Links
| This issue depends on: | ||||
| ZF-5363 | Zend_File_Transfer_Adapter_Abstract does not handle file uploads when no file is uploaded |
|
|
|
Can not be reproduced.
Feel free to reopen and give a full example.
See the manual and the several examples which are available.