diff options
author | szaimen <szaimen@e.mail.de> | 2021-11-10 15:50:15 +0100 |
---|---|---|
committer | szaimen <szaimen@e.mail.de> | 2021-11-10 15:50:15 +0100 |
commit | 3ac316b77fedfbd7edce99de0dd0c974ad6aacb4 (patch) | |
tree | da81e57e0b026e315e46b9eaff3d7706e38f5d48 /lib/private/legacy/OC_Image.php | |
parent | 9673579f2097be9cce225a69b804f4f06f124473 (diff) | |
download | nextcloud-server-3ac316b77fedfbd7edce99de0dd0c974ad6aacb4.tar.gz nextcloud-server-3ac316b77fedfbd7edce99de0dd0c974ad6aacb4.zip |
fix imagecreatetruecolor() error
Signed-off-by: szaimen <szaimen@e.mail.de>
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; |