Description

On some systems the magic file can't used by finfo. On using it php errors will be reported and tests fails.
I know this is not directly a ZF problem but Zend_Validate_File_Mimetype should throw an exception on setting an invalid magic file or if finfo isn't supported by php and the magic file can't used.

Additionally the first found magic files will be used (if not set) without testing its format.

To solve this
1. use the function based interface of finfo than an invalid magic file can detected and throw an exception
2. use the opened finfo resource (opened on setMagicFile to check format) within isValid
3. throw an exception finfo_file returns false -> it returns application/octed-stream if no matches was found
4. throw an exception on setMagicFile if finfo isn't available
5. set systems magic file on constructor (if no option) but don't throw an exception if invalid
(skip magic file if it has an invalid format and check the next)
6. add and use a valid magic file on tests

??You were adding an exception within isValid() which is not allowed.??
yes, but if finfo_file returns false I'm sure it's an internal error of finfo because it returns "application/octet-stream" if mimetype could not detect.
(finfo_file: Returns a textual description of the contents of the filename argument, or FALSE if an error occurred.)
-> On such cases than we need to add a new validate message and return false.

??Additionally you added some other problems by erasing the check for save_mode which integrates already solved issues.??
I will do some tests with it - don't tested it now

I see you closed ZF-9320, but:
1. if new finfo failes PHP-Notices are reported - This is also not allowed (if possible) on ZF
2. $mime isn't false if mime database is invalid. -> this is why I implemented it as open_finfo in my patch
3. You open an finfo instance twice -> on setMagicFile and on isValid /: