2
0
forked from Wavyzz/dolibarr

Fix: Removed warnings

This commit is contained in:
Laurent Destailleur
2012-03-03 16:44:05 +01:00
parent 2772d1dfa2
commit 6d8c1bf7c6
3 changed files with 26 additions and 56 deletions

View File

@@ -147,7 +147,7 @@ if (! function_exists('json_decode'))
/**
* Function that encodes data in json format
*
*
* @param mixed $elements PHP object to json encode
* @return string Json encoded string
*/
@@ -166,7 +166,7 @@ function dol_json_encode($elements)
function dol_json_decode($json, $assoc=false)
{
$out='';
$out = unserialize($json); // For compatibility, test if serialized
$out = @unserialize($json); // For compatibility, test if serialized
if (empty($out)) $out = json_decode($json, $assoc);
return $out;
}