Skip to content

Commit 11897bb

Browse files
committed
fix OC_Image: Prevent E_WARNING from getimagesize*
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
1 parent 2c05c24 commit 11897bb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/private/legacy/OC_Image.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,7 @@ private function checkImageMemory($width, $height) {
598598
* @return bool true if allocating is allowed, false otherwise
599599
*/
600600
private function checkImageSize($path) {
601-
$size = getimagesize($path);
601+
$size = @getimagesize($path);
602602
if (!$size) {
603603
return true;
604604
}
@@ -619,7 +619,7 @@ private function checkImageSize($path) {
619619
* @return bool true if allocating is allowed, false otherwise
620620
*/
621621
private function checkImageDataSize($data) {
622-
$size = getimagesizefromstring($data);
622+
$size = @getimagesizefromstring($data);
623623
if (!$size) {
624624
return true;
625625
}

0 commit comments

Comments
 (0)