Issues

ZF-9107: _detectMimeType() called from Zend_File_Transfer_Http::__construct() throws Warning on finfo() when magicFile is set as an option

Issue Type: Bug Created: 2010-02-06T22:03:28.000+0000 Last Updated: 2010-02-07T14:53:18.000+0000 Status: Resolved Fix version(s): - 1.10.1 (10/Feb/10)

Reporter: Noah Goodrich (gabriel1836) Assignee: Thomas Weidner (thomas) Tags: - Zend_File_Transfer

Related issues: - ZF-9068

Attachments:

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.

Comments

Posted by Ramon Henrique Ornelas (ramon) on 2010-02-07T02:35:03.000+0000

Reported in ZF-9068. Fixed by @thomas in r20911.

Have you found an issue?

See the Overview section for more details.

Copyright

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

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

Contacts