]> git.mxchange.org Git - friendica.git/commitdiff
Fix empty fetchResult at ExternalStorage (thx to Marco R.)
authorPhilipp <admin@philipp.info>
Tue, 3 Jan 2023 20:05:58 +0000 (21:05 +0100)
committerPhilipp <admin@philipp.info>
Tue, 3 Jan 2023 20:05:58 +0000 (21:05 +0100)
src/Model/Post/Link.php

index aa830a1d28261ed69c9242573060e07c36ad112f..343ad815c39783192ec7a03b448aaca8102f710c 100644 (file)
@@ -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]];