diff --git a/app/code/Magento/Cms/Model/Wysiwyg/Images/Storage.php b/app/code/Magento/Cms/Model/Wysiwyg/Images/Storage.php index 91ecd91f5c342..5cd4277ae48cc 100644 --- a/app/code/Magento/Cms/Model/Wysiwyg/Images/Storage.php +++ b/app/code/Magento/Cms/Model/Wysiwyg/Images/Storage.php @@ -724,13 +724,10 @@ public function resizeFile($source, $keepRatio = true) [$imageWidth, $imageHeight] = $this->getResizedParams($source); try { $image->resize($imageWidth, $imageHeight); - } - catch (\Throwable $e) - { - $this->logger->critical( 'FAILED WYSIWYG IMAGE RESIZING: ' . ' error: ' . $e->getMessage() . '. path: ' . $realPath ); + } catch (\Throwable $e) { + $this->logger->critical('FAILED WYSIWYG IMAGE RESIZING: ' . ' error: ' . $e->getMessage() . '. path: ' . $realPath); return false; } - $image->resize($imageWidth, $imageHeight); $dest = $targetDir . '/' . $this->ioFile->getPathInfo($source)['basename']; $image->save($dest); if ($this->_directory->isFile($this->_directory->getRelativePath($dest))) {