]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix OC_Image: Prevent E_WARNING from getimagesize* 37368/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:27:30 +0000 (14:27 +0000)
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
lib/private/legacy/OC_Image.php

index f2fa2058faa687d2023803ff048751bc8ccb19df..74e82e62b168cbb8172583a64f6b1200f53c13f7 100644 (file)
@@ -598,7 +598,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;
                }
@@ -619,7 +619,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;
                }