ZF-7860: IsImage filter no longer works with fileinfo extension in PHP5.3


This validator doesn't seem to work any more after upgrading to PHP5.3 (which now comes with fileinfo extension built in)

$mime = new finfo(FILEINFO_MIME);
$this->_type = $mime->file($value);

file() used to return just "image/jpeg", now it returns "image/jpeg; charset=binary". This no longer matches values in the predefined array and validation fails.


Fixed with r18147.

You could instead use Zend_Validate_MimeType which works already under 5.3 with this ZF release.