Fix: Avoid empty messages
This commit is contained in:
parent
c4ce66d784
commit
319b512157
@ -3494,13 +3494,13 @@ function setEventMessage($mesgs, $style='mesgs')
|
||||
if (! in_array($style,array('mesgs','warnings','errors'))) dol_print_error('','Bad parameter for setEventMessage');
|
||||
if (! is_array($mesgs)) // If mesgs is a string
|
||||
{
|
||||
$_SESSION['dol_events'][$style][] = $mesgs;
|
||||
if ($mesgs) $_SESSION['dol_events'][$style][] = $mesgs;
|
||||
}
|
||||
else // If mesgs is an array
|
||||
{
|
||||
foreach($mesgs as $mesg)
|
||||
{
|
||||
$_SESSION['dol_events'][$style][] = $mesg;
|
||||
if ($mesg) $_SESSION['dol_events'][$style][] = $mesg;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user