fix OC_Image: Prevent E_WARNING from getimagesize*

Signed-off-by: Marcel Klehr <mklehr@gmx.net>
This commit is contained in:
Marcel Klehr 2023-02-09 14:19:42 +01:00 committed by backportbot-nextcloud[bot]
parent 5589071173
commit f73ef9731c

View file

@ -595,7 +595,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;
}
@ -616,7 +616,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;
}