瀏覽代碼

Check for fileinfo

https://github.com/FreshRSS/FreshRSS/issues/1402
https://github.com/FreshRSS/FreshRSS/issues/1461
Alexandre Alapetite 9 年之前
父節點
當前提交
07a9faf851
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      lib/Favicon/Favicon.php

+ 1 - 1
lib/Favicon/Favicon.php

@@ -179,7 +179,7 @@ class Favicon
         // Sometimes people lie, so check the status.
         // Sometimes people lie, so check the status.
         // And sometimes, it's not even an image. Sneaky bastards!
         // And sometimes, it's not even an image. Sneaky bastards!
         // If cacheDir isn't writable, that's not our problem
         // If cacheDir isn't writable, that's not our problem
-        if ($favicon && is_writable($this->cacheDir) && !$this->checkImageMType($favicon)) {
+        if ($favicon && is_writable($this->cacheDir) && extension_loaded('fileinfo') && !$this->checkImageMType($favicon)) {
             $favicon = false;
             $favicon = false;
         }
         }