Skip to content

Commit 452dc38

Browse files
authored
Merge pull request #37368 from nextcloud/backport/36636/stable26
[stable26] fix OC_Image: Prevent E_WARNING from getimagesize*
2 parents 69a55f9 + ac0eab1 commit 452dc38

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)