From: Philipp Date: Tue, 3 Jan 2023 20:05:58 +0000 (+0100) Subject: Fix empty fetchResult at ExternalStorage (thx to Marco R.) X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=3110831131c0ab0c781d4916930a73ac2f0ce3f4;p=friendica.git Fix empty fetchResult at ExternalStorage (thx to Marco R.) --- diff --git a/src/Model/Post/Link.php b/src/Model/Post/Link.php index aa830a1d28..343ad815c3 100644 --- a/src/Model/Post/Link.php +++ b/src/Model/Post/Link.php @@ -126,7 +126,7 @@ class Link $timeout = DI::config()->get('system', 'xrd_timeout'); $curlResult = HTTPSignature::fetchRaw($url, 0, [HttpClientOptions::TIMEOUT => $timeout, HttpClientOptions::ACCEPT_CONTENT => $accept]); - if (!$curlResult->isSuccess()) { + if (empty($curlResult) || !$curlResult->isSuccess()) { return []; } $fields = ['mimetype' => $curlResult->getHeader('Content-Type')[0]];