diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index e1d7fe6ca86..9dc0077903e 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -8634,6 +8634,10 @@ function dol_eval($s, $returnvalue = 0, $hideerrors = 1, $onlysimplestring = '1' } } } + + if (is_array($s) || $s === 'Array') { + return 'Bad string syntax to evaluate (value is Array) '.var_export($s, true); + } if (strpos($s, '::') !== false) { if ($returnvalue) { return 'Bad string syntax to evaluate (double : char is forbidden): '.$s;