ZF-11484: setting enableHeaderCheck doesn't read the file type passed by the browser


If fileinfo is NOT enabled and enableHeaderCheck is set to true on the isImage validator the "type" in the $_FILES array is NOT used. Things go wrong because in Zend_File_Transfer_Adapter_Abstract the _detectMimeType function defaults to "application/octet-stream" if fileinfo isn't found which is used to set the type in the adapters internal files hash. Maybe the validator should use the $_FILES array directly or the _dectectMimeType should consider the headerCheck flag and fall back on using the "type" key.


No comments to display