Fix empty fetchResult at ExternalStorage (thx to Marco R.)

This commit is contained in:
Philipp 2023-01-03 21:05:58 +01:00
parent 19603fd6a5
commit 3110831131
No known key found for this signature in database
GPG key ID: 24A7501396EB5432

View 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]];