3 ms·
The culprit is a horrific piece of code from 2010. if (!function_exists('json_decode')) { function json_decode($json,$to_array=false) { $x=false; if (!
by lioeters 4y ago
The culprit is a horrific piece of code from 2010.
if (!function_exists('json_decode')) {
function json_decode($json,$to_array=false) {
$x=false;
if (!empty($json) && strpos($json,'{"')!==false) {
$out =
'$x='.str_replace(array('{','":','}'),array('array(','"=>',')'),$json);
eval($out.';');
if (!$to_array) $x = (object) $x;
}
return $x;
} //end function json_decode
}