Browse Source
Merge pull request #29632 from nextcloud/fix/26118/imagecreatetruecolor-error
fix imagecreatetruecolor() error
pull/29808/head
Vincent Petry
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
4 additions and
0 deletions
-
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; |
|
|
|