From 27866f6811226f2f03260a8571ed66dcac6f95c7 Mon Sep 17 00:00:00 2001 From: Anthony Berton Date: Wed, 1 Feb 2023 01:04:29 +0100 Subject: [PATCH] error only 1 receiver in select --- htdocs/core/class/html.formmail.class.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/htdocs/core/class/html.formmail.class.php b/htdocs/core/class/html.formmail.class.php index 439a52d95a5..7871b8e82cb 100644 --- a/htdocs/core/class/html.formmail.class.php +++ b/htdocs/core/class/html.formmail.class.php @@ -1078,11 +1078,8 @@ class FormMail extends Form $tmparray[$key] = dol_htmlentities($tmparray[$key], null, 'UTF-8', true); } - if (getDolGlobalInt('MAIN_MAIL_NO_WITH_TO_SELECTED')) { - $withtoselected = ''; - } else { - $withtoselected = GETPOST("receiver", 'array'); // Array of selected value - + $withtoselected = GETPOST("receiver", 'array'); // Array of selected value + if (!getDolGlobalInt('MAIN_MAIL_NO_WITH_TO_SELECTED')) { if (empty($withtoselected) && count($tmparray) == 1 && GETPOST('action', 'aZ09') == 'presend') { $withtoselected = array_keys($tmparray); }