Explorar el Código

Merge pull request #1452 from Alkarex/Favicon-warning-fix

Fix Favicon library warning
Alexandre Alapetite hace 9 años
padre
commit
a78ebd0965
Se han modificado 2 ficheros con 4 adiciones y 1 borrados
  1. 1 1
      CHANGELOG.md
  2. 3 0
      lib/Favicon/Favicon.php

+ 1 - 1
CHANGELOG.md

@@ -20,7 +20,7 @@
 		* Allow empty strings in CLI do-install [#1435](https://github.com/FreshRSS/FreshRSS/pull/1435)
 	* Fix PostgreSQL bugs with API and feed modifications [#1417](https://github.com/FreshRSS/FreshRSS/pull/1417)
 	* Do not mark as read in anonymous mode [#1431](https://github.com/FreshRSS/FreshRSS/issues/1431)
-	* Fix Favicons warning [#59dfc64](https://github.com/FreshRSS/FreshRSS/pull/1447/commits/59dfc64512372eaba7609d84500d943bb7274399)
+	* Fix Favicons warnings [#59dfc64](https://github.com/FreshRSS/FreshRSS/commit/59dfc64512372eaba7609d84500d943bb7274399), [#1452](https://github.com/FreshRSS/FreshRSS/pull/1452)
 * Security
 	* Sanitize feed Web site URL [#1434](https://github.com/FreshRSS/FreshRSS/issues/1434)
 	* No version number for anonymous users [#1404](https://github.com/FreshRSS/FreshRSS/issues/1404)

+ 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]) ) {