Merge pull request #36636 from nextcloud/fix/oc-image-getimagesize

fix OC_Image: Prevent E_WARNING from getimagesize*
pull/37370/head
Simon L 1 year ago committed by GitHub
commit 67614150b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -598,7 +598,7 @@ class OC_Image implements \OCP\IImage {
* @return bool true if allocating is allowed, false otherwise
*/
private function checkImageSize($path) {
$size = getimagesize($path);
$size = @getimagesize($path);
if (!$size) {
return true;
}
@ -619,7 +619,7 @@ class OC_Image implements \OCP\IImage {
* @return bool true if allocating is allowed, false otherwise
*/
private function checkImageDataSize($data) {
$size = getimagesizefromstring($data);
$size = @getimagesizefromstring($data);
if (!$size) {
return true;
}

Loading…
Cancel
Save