Index: ZendFramework/lastest/library/Zend/Form/Element/File.php =================================================================== --- ZendFramework/lastest/library/Zend/Form/Element/File.php (revision 11240) +++ ZendFramework/lastest/library/Zend/Form/Element/File.php (working copy) @@ -258,10 +258,6 @@ $adapter = $this->getTransferAdapter(); $this->setValue($adapter->getFileName($this->getName())); - if (!$this->isRequired() && empty($value)) { - return true; - } - if ($this->isRequired() && $this->autoInsertNotEmptyValidator() && !$this->getValidator('NotEmpty')) @@ -272,9 +268,15 @@ $this->setValidators($validators); } - if($adapter->receive($value)) { + if($adapter->receive($this->getName())) { return true; } + + if (!$this->isRequired() && $adapter->getErrors() == array(Zend_Validate_File_Upload::NO_FILE)){ + $adapter->clearErrors(); + return true; + } + return false; }