forked from Wavyzz/dolibarr
Fix: Init
This commit is contained in:
@@ -206,13 +206,14 @@ if (! function_exists('json_decode'))
|
|||||||
* Implement json_decode for PHP that does not support it
|
* Implement json_decode for PHP that does not support it
|
||||||
*
|
*
|
||||||
* @param string $json Json encoded to PHP Object or Array
|
* @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
|
* @return mixed Object or Array
|
||||||
*/
|
*/
|
||||||
function dol_json_decode($json, $assoc=false)
|
function dol_json_decode($json, $assoc=false)
|
||||||
{
|
{
|
||||||
$comment = false;
|
$comment = false;
|
||||||
|
|
||||||
|
$out='';
|
||||||
$strLength = strlen($json); // Must stay strlen and not dol_strlen because we want technical length, not visible length
|
$strLength = strlen($json); // Must stay strlen and not dol_strlen because we want technical length, not visible length
|
||||||
for ($i=0; $i<$strLength; $i++)
|
for ($i=0; $i<$strLength; $i++)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user