Merge pull request #12292 from frederic34/patch-17

FIX $key is overwriting a variable from outer foreach loop
This commit is contained in:
Laurent Destailleur 2019-11-02 11:38:54 +01:00 committed by GitHub
commit f8afd70f28
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -236,7 +236,7 @@ foreach($listofnotifiedevents as $notifiedevent)
$s='<input type="text" size="32" name="NOTIF_'.$notifiedevent['code'].'_old_'.$reg[1].'_key" value="'.dol_escape_htmltag($value).'">'; // Do not use type="email" here, we must be able to enter a list of email with , separator.
$arrayemail=explode(',', $value);
$showwarning=0;
foreach($arrayemail as $key=>$valuedet)
foreach($arrayemail as $keydet => $valuedet)
{
$valuedet=trim($valuedet);
if (! empty($valuedet) && ! isValidEmail($valuedet, 1)) $showwarning++;