ソースを参照

merge revision 25174 to release-1.12

git-svn-id: http://framework.zend.com/svn/framework/standard/branches/release-1.12@25175 44c647ce-9c0f-0410-b52a-842ac1e357ba
rob 13 年 前
コミット
4c3b0dc240
1 ファイル変更6 行追加1 行削除
  1. 6 1
      library/Zend/Validate/File/MimeType.php

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

@@ -150,11 +150,16 @@ class Zend_Validate_File_MimeType extends Zend_Validate_Abstract
     /**
      * Returns the actual set magicfile
      *
+     * Note that for PHP 5.3.0 or higher, we don't use $_ENV['MAGIC'] or try to
+     * find a magic file in a common location as PHP now has a built-in internal
+     * magic file.
+     *
      * @return string
      */
     public function getMagicFile()
     {
-        if (null === $this->_magicfile) {
+        if (version_compare(PHP_VERSION, '5.3.0', '<')
+            && null === $this->_magicfile) {
             if (!empty($_ENV['MAGIC'])) {
                 $this->setMagicFile($_ENV['MAGIC']);
             } elseif (