Issues

ZF-4199: Zend_Form_Element_File::isValid misuse of $value ?

Description

As I anderstand the code, this method receive a $value that can only be null as a value of an input type file is not present in $_POST. The line 259 : $this->setValue($adapter->getFileName($this->getName())) just show the construction of the value using the Adapter.

The problem is that lines 261 & 275 use the $value instead of $this->_value that was computed by the adapter. This leads to, if file is not required, no upload at all, the "if" line 261 is always true as empty(null) == true.

Comments

Duplication of ZF-4140.