]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix OC_Image: Prevent E_WARNING from getimagesize* 37367/head
authorMarcel Klehr <mklehr@gmx.net>
Thu, 9 Feb 2023 13:19:42 +0000 (14:19 +0100)
committerbackportbot-nextcloud[bot] <backportbot-nextcloud[bot]@users.noreply.github.com>
Thu, 23 Mar 2023 14:18:35 +0000 (14:18 +0000)
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
lib/private/legacy/OC_Image.php

index a212d6390848ccac37c917dd9edb5d0ab2ff9a1c..441e779aa291499df67a91580032b9ce8d17eecb 100644 (file)
@@ -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;
                }