From 53080dc3975b3672157061ec224eb21325e170d0 Mon Sep 17 00:00:00 2001 From: "Chhandak.Barua" Date: Mon, 22 Jul 2024 19:27:49 +0530 Subject: [PATCH] ACP2E-3127: imagecreatetruecolor(): Argument #2 () must be greater than 0. Can't upload specific image --- app/code/Magento/Cms/Model/Wysiwyg/Images/Storage.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Cms/Model/Wysiwyg/Images/Storage.php b/app/code/Magento/Cms/Model/Wysiwyg/Images/Storage.php index 5cd4277ae48cc..6e1b52ad5e89a 100644 --- a/app/code/Magento/Cms/Model/Wysiwyg/Images/Storage.php +++ b/app/code/Magento/Cms/Model/Wysiwyg/Images/Storage.php @@ -725,7 +725,9 @@ public function resizeFile($source, $keepRatio = true) try { $image->resize($imageWidth, $imageHeight); } catch (\Throwable $e) { - $this->logger->critical('FAILED WYSIWYG IMAGE RESIZING: ' . ' error: ' . $e->getMessage() . '. path: ' . $realPath); + $this->logger->critical( + 'FAILED WYSIWYG IMAGE RESIZING: ' . ' error: ' . $e->getMessage() . '. path: ' . $realPath + ); return false; } $dest = $targetDir . '/' . $this->ioFile->getPathInfo($source)['basename'];