Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.10.0
-
Fix Version/s: 1.10.1
-
Component/s: Zend_File_Transfer
-
Labels:None
Description
When calling Zend_File_Transfer_Http::__construct(), finfo() warning errors will be thrown in Zend_File_Transfer_Abstract::_detectMimeType() if finfo() cannot automatically detect the location of the magic database file.
The problems are two-fold:
1) Zend_File_Transfer_Abstract::_detectMimeType() does a check on $magicFile but the variable is never declared so it will always fail. This should implement a more valid check on a method like getMagicFile() or something.
2) Zend_File_Transfer_Http::__construct() calls Zend_File_Transfer::_prepareFiles() which is the method that actually calls _detectMimeType() before it calls Zend_File_Transfer_Abstract::setOptions() so the file can never be set prior to the _detectMimeType() method being called the first time.
Issue Links
| This issue duplicates: | ||||
| ZF-9068 | File_Transfer_Adapter_Abstract: _detectMimeType() uses undeclared variable $magicFile |
|
|
|
Reported in
ZF-9068.Fixed by @thomas in r20911.
ZF-9068. Fixed by @thomas in r20911.