From 517e9094da6fcee5c3594140f2f965550b7d282e Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Mon, 27 Jul 2015 22:34:30 +0200 Subject: [PATCH] FIX : Avoid warning strict mode when hosting server do not have php5_curl installed --- htdocs/core/lib/json.lib.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/core/lib/json.lib.php b/htdocs/core/lib/json.lib.php index ba7f4cd3f90..ca79c21e9ef 100644 --- a/htdocs/core/lib/json.lib.php +++ b/htdocs/core/lib/json.lib.php @@ -251,7 +251,9 @@ function dol_json_decode($json, $assoc=false) if (! empty($array)) { $object = false; - + if (count($array)>0) { + $object = (object) array(); + } foreach ($array as $key => $value) { if ($key) $object->{$key} = $value;