Fix: Test fails if value is 0

This commit is contained in:
Laurent Destailleur 2012-11-14 18:56:47 +01:00
parent 768e719961
commit 4c4eeaac2a

View File

@ -3565,7 +3565,7 @@ function get_date_range($date_start,$date_end,$format = '',$outputlangs='')
*/
function setEventMessage($mesgs, $style='mesgs')
{
if (! in_array($style,array('mesgs','warnings','errors'))) dol_print_error('','Bad parameter for setEventMessage');
if (! in_array((string) $style, array('mesgs','warnings','errors'))) dol_print_error('','Bad parameter for setEventMessage');
if (! is_array($mesgs)) // If mesgs is a string
{
if ($mesgs) $_SESSION['dol_events'][$style][] = $mesgs;