EspoCRM – Open Source CRM Application
PHP calendarcontactscrmcrm-platformcrm-systemcustomer-portalcustomer-supportcustomizabledocumentsemail-marketingkanbanleadsopen-sourcephpplatformsales-automationsingle-page-applicationsupport
fix image resize when width to height is large
Yurii22cbfb669cd9
diff --git a/application/Espo/EntryPoints/Image.php b/application/Espo/EntryPoints/Image.phpindex 8f1d0af583..7eb12269b9 100644--- a/application/Espo/EntryPoints/Image.php+++ b/application/Espo/EntryPoints/Image.php@@ -267,8 +267,12 @@ class Image implements EntryPoint}}- if ($targetWidth < 1 || $targetHeight < 1) {- throw new RuntimeException("No width or height.");+ if ($targetWidth < 1) {+ $targetWidth = 1;+ }++ if ($targetHeight < 1) {+ $targetHeight = 1;}$targetImage = imagecreatetruecolor($targetWidth, $targetHeight);