diff --git a/htdocs/core/lib/json.lib.php b/htdocs/core/lib/json.lib.php index 0704f035848..94842975377 100644 --- a/htdocs/core/lib/json.lib.php +++ b/htdocs/core/lib/json.lib.php @@ -206,13 +206,14 @@ if (! function_exists('json_decode')) * Implement json_decode for PHP that does not support it * * @param string $json Json encoded to PHP Object or Array - * @param bool $assoc False return an object, true return an array + * @param bool $assoc False return an object, true return an array. Try to always use it with true ! * @return mixed Object or Array */ function dol_json_decode($json, $assoc=false) { $comment = false; + $out=''; $strLength = strlen($json); // Must stay strlen and not dol_strlen because we want technical length, not visible length for ($i=0; $i<$strLength; $i++) {