Zend Framework

Zend_File_Transfer_Http::setOptions() fails to modify $_options if Zend_File_Transfer::_getFiles() returns an empty array

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.10.1
  • Fix Version/s: 1.10.2
  • Component/s: Zend_File_Transfer
  • Labels:
    None

Description

Zend_File_Transfer::setOptions() contains the following check:

$file = $this->_getFiles($files, false, true); // Always returns an array() even if it is empty.

if (is_array($options)) {
if ($file === null) { // Because $file will always be an array, this can never execute. $this->_options = array_merge($this->_options, $options); }

// Code Continues....

Basically the check should be:

if(empty($file)) {

}

Issue Links

Activity

Hide
Thomas Weidner added a comment -

Fixed with r21039

Show
Thomas Weidner added a comment - Fixed with r21039

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: