From f73ef9731c1c264066a3fe3571324618729cc2fd Mon Sep 17 00:00:00 2001 From: Marcel Klehr Date: Thu, 9 Feb 2023 14:19:42 +0100 Subject: [PATCH] fix OC_Image: Prevent E_WARNING from getimagesize* Signed-off-by: Marcel Klehr --- lib/private/legacy/OC_Image.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/private/legacy/OC_Image.php b/lib/private/legacy/OC_Image.php index a212d639084..441e779aa29 100644 --- a/lib/private/legacy/OC_Image.php +++ b/lib/private/legacy/OC_Image.php @@ -595,7 +595,7 @@ class OC_Image implements \OCP\IImage { * @return bool true if allocating is allowed, false otherwise */ private function checkImageSize($path) { - $size = getimagesize($path); + $size = @getimagesize($path); if (!$size) { return true; } @@ -616,7 +616,7 @@ class OC_Image implements \OCP\IImage { * @return bool true if allocating is allowed, false otherwise */ private function checkImageDataSize($data) { - $size = getimagesizefromstring($data); + $size = @getimagesizefromstring($data); if (!$size) { return true; } -- 2.39.5