]> git.mxchange.org Git - friendica.git/blobdiff - src/Util/Images.php
spelling: one
[friendica.git] / src / Util / Images.php
index 6874d36e9bc3e7d93fd8e719fbd37b7b9744c929..90d120081b66527e5682f2860e8b94dec5c7766a 100644 (file)
@@ -229,7 +229,12 @@ class Images
                }
 
                if (empty($img_str)) {
-                       $img_str = DI::httpClient()->fetch($url, HttpClientAccept::IMAGE, 4);
+                       try {
+                               $img_str = DI::httpClient()->fetch($url, HttpClientAccept::IMAGE, 4);
+                       } catch (\Exception $exception) {
+                               Logger::notice('Image is invalid', ['url' => $url, 'exception' => $exception]);
+                               return [];
+                       }
                }
 
                if (!$img_str) {