Jelajahi Sumber

Fix Favicon library warning

https://github.com/Alkarex/FreshRSS/commit/59dfc64512372eaba7609d84500d943bb7274399
https://github.com/FreshRSS/FreshRSS/issues/1445#issuecomment-284176492
Alexandre Alapetite 9 tahun lalu
induk
melakukan
6102489d57
1 mengubah file dengan 3 tambahan dan 0 penghapusan
  1. 3 0
      lib/Favicon/Favicon.php

+ 3 - 0
lib/Favicon/Favicon.php

@@ -89,6 +89,9 @@ class Favicon
         $loop = TRUE;
         while ($loop && $max_loop-- > 0) {
             $headers = $this->dataAccess->retrieveHeader($url);
+            if (empty($headers)) {
+                return false;
+            }
             $exploded = explode(' ', $headers[0]);
             
             if( !isset($exploded[1]) ) {