Zend Framework

Zend_Form_Element_File::isValid misuse of $value ?

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Blocker Blocker
  • Resolution: Duplicate
  • Affects Version/s: 1.6.0
  • Fix Version/s: 1.6.1
  • Component/s: Zend_Form
  • Labels:
    None

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.

Activity

Hide
Thomas Weidner added a comment -

Duplication of ZF-4140.

Show
Thomas Weidner added a comment - Duplication of ZF-4140.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved:

Time Tracking

Estimated:
Not Specified
Original Estimate - Not Specified
Remaining:
0m
Remaining Estimate - 0 minutes
Logged:
15m
Time Spent - 15 minutes