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