EspoCRM – Open Source CRM Application
PHP calendarcontactscrmcrm-platformcrm-systemcustomer-portalcustomer-supportcustomizabledocumentsemail-marketingkanbanleadsopen-sourcephpplatformsales-automationsingle-page-applicationsupport
fix save email settings
Yuri Kuznetsov963fb40b2b04
diff --git a/install/core/actions/saveEmailSettings.php b/install/core/actions/saveEmailSettings.phpindex ec1ad29638..7062cc63d1 100644--- a/install/core/actions/saveEmailSettings.php+++ b/install/core/actions/saveEmailSettings.php@@ -39,27 +39,26 @@ if (!empty($_SESSION['install'])) {];$preferences = [];- foreach ($paramList as $paramName) {+ foreach ($paramList as $paramName) {switch ($paramName) {- case 'smtpAuth':- $preferences['smtpAuth'] = (empty($_SESSION['install']['smtpAuth']) || $_SESSION['install']['smtpAuth'] == 'false' || !$_SESSION['install']['smtpAuth']) ? false : true;- break;-case 'outboundEmailIsShared':- $preferences['outboundEmailIsShared'] = (empty($_SESSION['install']['smtpAuth']) || $_SESSION['install']['outboundEmailIsShared'] == 'false' || !$_SESSION['install']['smtpAuth']) ? false : true;+ $preferences['outboundEmailIsShared'] = $_SESSION['install']['outboundEmailIsShared'] === 'true';+break;default:if (array_key_exists($paramName, $_SESSION['install'])) {$preferences[$paramName] = $_SESSION['install'][$paramName];}+break;}}$res = $installer->savePreferences($preferences);+if (!empty($res)) {$result['success'] = true;} else {