Browse Source

[GENERIC] Zend_Validate:

- some corrections

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@20408 44c647ce-9c0f-0410-b52a-842ac1e357ba
thomas 16 years ago
parent
commit
a76251735f
1 changed files with 6 additions and 5 deletions
  1. 6 5
      library/Zend/Validate/File/MimeType.php

+ 6 - 5
library/Zend/Validate/File/MimeType.php

@@ -314,12 +314,13 @@ class Zend_Validate_File_MimeType extends Zend_Validate_Abstract
             unset($mime);
             unset($mime);
         }
         }
 
 
-        if (empty($this->_type)) {
-            if (function_exists('mime_content_type') && ini_get('mime_magic.magicfile')) {
+        if (empty($this->_type)) &&
+            (function_exists('mime_content_type') && ini_get('mime_magic.magicfile')) {
                 $this->_type = mime_content_type($value);
                 $this->_type = mime_content_type($value);
-            } elseif ($this->_headerCheck) {
-                $this->_type = $file['type'];
-            }
+        }
+
+        if (empty($this->_type) && $this->_headerCheck) {
+            $this->_type = $file['type'];
         }
         }
 
 
         if (empty($this->_type)) {
         if (empty($this->_type)) {