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
parent
commit
1efdd6ccae
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      lib/private/legacy/OC_Image.php

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

Loading…
Cancel
Save