Return empty array on error (I hope it works this way).

This commit is contained in:
Roland Häder 2022-06-22 11:49:54 +02:00
parent 2dd7d465e8
commit feec96cbc4
No known key found for this signature in database
GPG Key ID: C82EDE5DDFA0BA77

View File

@ -206,6 +206,7 @@ class Images
/** /**
* Gets info from URL uncached * Gets info from URL uncached
*
* @param string $url URL * @param string $url URL
* @return array Info array * @return array Info array
* @throws \Friendica\Network\HTTPException\InternalServerErrorException * @throws \Friendica\Network\HTTPException\InternalServerErrorException
@ -246,7 +247,7 @@ class Images
$data['size'] = $filesize; $data['size'] = $filesize;
} }
return $data; return $data ?? [];
} }
/** /**