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

Issue Type: Bug Created: 2008-09-05T06:57:54.000+0000 Last Updated: 2008-09-06T05:07:58.000+0000 Status: Resolved Fix version(s): - 1.6.1 (15/Sep/08)

Reporter: Patrick Barroca (patbator) Assignee: Thomas Weidner (thomas) Tags: - Zend_Form

Related issues: Attachments:


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.


Posted by Thomas Weidner (thomas) on 2008-09-06T05:07:39.000+0000

Duplication of ZF-4140.

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.