From feec96cbc466ea9ced2745306ef604cfd9acf165 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Wed, 22 Jun 2022 11:49:54 +0200 Subject: [PATCH] Return empty array on error (I hope it works this way). --- src/Util/Images.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Util/Images.php b/src/Util/Images.php index 20212e4953..c36ce26899 100644 --- a/src/Util/Images.php +++ b/src/Util/Images.php @@ -206,6 +206,7 @@ class Images /** * Gets info from URL uncached + * * @param string $url URL * @return array Info array * @throws \Friendica\Network\HTTPException\InternalServerErrorException @@ -246,7 +247,7 @@ class Images $data['size'] = $filesize; } - return $data; + return $data ?? []; } /** -- 2.39.5