From e0785ac5ef316cf737c6d5d7fcf200059646d52c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 26 Feb 2021 10:31:02 +0100 Subject: [PATCH] Update html.formmail.class.php --- htdocs/core/class/html.formmail.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/html.formmail.class.php b/htdocs/core/class/html.formmail.class.php index d505bd1fada..46fcd5e331b 100644 --- a/htdocs/core/class/html.formmail.class.php +++ b/htdocs/core/class/html.formmail.class.php @@ -455,7 +455,7 @@ class FormMail extends Form // Zone to select email template if (count($modelmail_array) > 0) { - $model_mail_selected_id = GETPOSTISSET('modelmailselected') ? GETPOST('modelmailselected', 'int') : (($arraydefaultmessage->id) ? $arraydefaultmessage->id : 0); + $model_mail_selected_id = GETPOSTISSET('modelmailselected') ? GETPOST('modelmailselected', 'int') : ($arraydefaultmessage->id > 0 ? $arraydefaultmessage->id : 0); // If list of template is filled $out .= '
'."\n";