Skip to content

Commit

Permalink
Merge pull request #37367 from nextcloud/backport/36636/stable24
Browse files Browse the repository at this point in the history
[stable24] fix OC_Image: Prevent E_WARNING from getimagesize*
  • Loading branch information
artonge authored Mar 27, 2023
2 parents ab5060f + f73ef97 commit e0bc3b7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/private/legacy/OC_Image.php
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,7 @@ private function checkImageMemory($width, $height) {
* @return bool true if allocating is allowed, false otherwise
*/
private function checkImageSize($path) {
$size = getimagesize($path);
$size = @getimagesize($path);
if (!$size) {
return true;
}
Expand All @@ -616,7 +616,7 @@ private function checkImageSize($path) {
* @return bool true if allocating is allowed, false otherwise
*/
private function checkImageDataSize($data) {
$size = getimagesizefromstring($data);
$size = @getimagesizefromstring($data);
if (!$size) {
return true;
}
Expand Down

0 comments on commit e0bc3b7

Please sign in to comment.