Fix empty fetchResult at ExternalStorage (thx to Marco R.)
This commit is contained in:
parent
19603fd6a5
commit
3110831131
|
@ -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]];
|
||||
|
|
Loading…
Reference in a new issue