Use !empty when using the setting->get method

This commit is contained in:
FusionPBX 2023-09-19 12:17:04 -06:00 committed by GitHub
parent 0931324d13
commit 7f2934ff24
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -417,10 +417,10 @@ if (!class_exists('email')) {
$smtp['validate_certificate'] = $this->setting->get('email','smtp_validate_certificate');
$smtp['crypto_method'] = $this->setting->get('email','smtp_crypto_method') ?? null;
if (isset($this->setting->get('voicemail','smtp_from')) && !empty($this->setting->get('voicemail','smtp_from'))) {
if (!empty($this->setting->get('voicemail','smtp_from')) && !empty($this->setting->get('voicemail','smtp_from'))) {
$smtp['from'] = $this->setting->get('voicemail','smtp_from');
}
if (isset($this->setting->get('voicemail','smtp_from_name')) && !empty($this->setting->get('voicemail','smtp_from_name'))) {
if (!empty($this->setting->get('voicemail','smtp_from_name')) && !empty($this->setting->get('voicemail','smtp_from_name'))) {
$smtp['from_name'] = $this->setting->get('voicemail','smtp_from_name');
}