diff options
Diffstat (limited to 'lib/private/legacy/OC_Image.php')
-rw-r--r-- | lib/private/legacy/OC_Image.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/private/legacy/OC_Image.php b/lib/private/legacy/OC_Image.php index c30ceae9916..b9ef31ed9fa 100644 --- a/lib/private/legacy/OC_Image.php +++ b/lib/private/legacy/OC_Image.php @@ -924,6 +924,10 @@ class OC_Image implements \OCP\IImage { * @return resource|bool|\GdImage */ public function preciseResizeNew(int $width, int $height) { + if (!($width > 0) || !($height > 0)) { + $this->logger->info(__METHOD__ . '(): Requested image size not bigger than 0', ['app' => 'core']); + return false; + } if (!$this->valid()) { $this->logger->error(__METHOD__ . '(): No image loaded', ['app' => 'core']); return false; |