From 3110831131c0ab0c781d4916930a73ac2f0ce3f4 Mon Sep 17 00:00:00 2001 From: Philipp Date: Tue, 3 Jan 2023 21:05:58 +0100 Subject: [PATCH] Fix empty fetchResult at ExternalStorage (thx to Marco R.) --- src/Model/Post/Link.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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]];