Merge pull request #29802 from nextcloud/backport/29632/stable22

[stable22] fix imagecreatetruecolor() error
This commit is contained in:
szaimen 2021-11-25 17:30:26 +01:00 committed by GitHub
commit f64987b7f2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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