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 authored and backportbot-nextcloud[bot] committed Mar 23, 2023
1 parent 5589071 commit f73ef97
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 f73ef97

Please sign in to comment.