error only 1 receiver in select

This commit is contained in:
Anthony Berton 2023-02-01 01:04:29 +01:00
parent 3db523b4c6
commit 27866f6811

View File

@ -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);
}