Skip to content

Commit

Permalink
fix OC_Image: Prevent E_WARNING from getimagesize*
Browse files Browse the repository at this point in the history
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
  • Loading branch information
marcelklehr committed Feb 9, 2023
1 parent 2c05c24 commit 11897bb
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 @@ -598,7 +598,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 @@ -619,7 +619,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 11897bb

Please sign in to comment.