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


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)) {



Fixed with r21039