From c592bc88b83ffa1ff25dfa32edb13f24d744f207 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 15 Jun 2012 02:17:00 +0200 Subject: [PATCH] Fix: Init --- htdocs/core/lib/json.lib.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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++) {