Merge pull request #29632 from nextcloud/fix/26118/imagecreatetruecolor-error

fix imagecreatetruecolor() error
pull/29808/head
Vincent Petry 2021-11-19 17:24:50 +07:00 committed by GitHub
commit 1efdd6ccae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

@ -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;