Explorar o código

[ZF-9320] Zend_Validate_File_MimeType:

- added a potential rework for a finfo bug

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@22832 44c647ce-9c0f-0410-b52a-842ac1e357ba
thomas %!s(int64=15) %!d(string=hai) anos
pai
achega
8edffbe0e5
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      library/Zend/Validate/File/MimeType.php

+ 1 - 1
library/Zend/Validate/File/MimeType.php

@@ -191,7 +191,7 @@ class Zend_Validate_File_MimeType extends Zend_Validate_Abstract
             $this->_magicfile = null;
             require_once 'Zend/Validate/Exception.php';
             throw new Zend_Validate_Exception('Magicfile can not be set. There is no finfo extension installed');
-        } else if (!is_readable($file)) {
+        } else if (!is_file($file) || !is_readable($file)) {
             require_once 'Zend/Validate/Exception.php';
             throw new Zend_Validate_Exception('The given magicfile can not be read');
         } else {