diff options
Diffstat (limited to 'it.class')
-rw-r--r-- | it.class | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1263,7 +1263,7 @@ static function json_encode($data, $p = []) */ static function json_decode($json, $p = []) { - return ($data = json_decode($json, $p['assoc'])) === null && $json != 'null' ? it::error((array)$p['it_error'] + ['title' => "invalid json", 'body' => $json]) : $data; + return ($data = json_decode($json, $p['assoc'])) === null && trim($json) != 'null' ? it::error((array)$p['it_error'] + ['title' => "invalid json", 'body' => $json]) : $data; } /** |