From 0279b3dee94bf4a4b743580b22e1e3b793c93326 Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 22 Nov 2023 19:16:09 +0000 Subject: [PATCH] Fix warning: Undefined array key "mime" --- src/Util/Images.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Util/Images.php b/src/Util/Images.php index 71a8bfea7e..1305441304 100644 --- a/src/Util/Images.php +++ b/src/Util/Images.php @@ -244,12 +244,12 @@ class Images $filesize = strlen($img_str); try { - $data = (array)@getimagesizefromstring($img_str); + $data = @getimagesizefromstring($img_str); } catch (\Exception $e) { return []; } - if (empty($data)) { + if (!$data) { return []; }