Merge pull request #29803 from nextcloud/backport/29632/stable21

[stable21] fix imagecreatetruecolor() error
This commit is contained in:
MichaIng 2021-11-25 17:14:08 +01:00 committed by GitHub
commit e5daae9101
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -925,6 +925,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;