diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 26fef322e06..510c22a0af9 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -9022,7 +9022,7 @@ function setEventMessage($mesgs, $style = 'mesgs', $noduplicate = 0) { //dol_syslog(__FUNCTION__ . " is deprecated", LOG_WARNING); This is not deprecated, it is used by setEventMessages function if (!is_array($mesgs)) { - $mesgs = trim((string)$mesgs); + $mesgs = trim((string) $mesgs); // If mesgs is a not an empty string if ($mesgs) { if (!empty($noduplicate) && isset($_SESSION['dol_events'][$style]) && in_array($mesgs, $_SESSION['dol_events'][$style])) { @@ -9033,7 +9033,7 @@ function setEventMessage($mesgs, $style = 'mesgs', $noduplicate = 0) } else { // If mesgs is an array foreach ($mesgs as $mesg) { - $mesg = trim((string)$mesg); + $mesg = trim((string) $mesg); if ($mesg) { if (!empty($noduplicate) && isset($_SESSION['dol_events'][$style]) && in_array($mesg, $_SESSION['dol_events'][$style])) { return;