X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FUtil%2FImages.php;h=90d120081b66527e5682f2860e8b94dec5c7766a;hb=46cd39fb34613f4b331793f19c0e562f93125066;hp=a6a9f4f7db78f66255bf86f9dbf457521742afa6;hpb=e4702ed464181b2534116fac2261fb6733ae76cd;p=friendica.git diff --git a/src/Util/Images.php b/src/Util/Images.php index a6a9f4f7db..90d120081b 100644 --- a/src/Util/Images.php +++ b/src/Util/Images.php @@ -1,6 +1,6 @@ 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) {