From 9f2456c3e8122f739cee7d2654fd62a5d8931d8c Mon Sep 17 00:00:00 2001 From: Urban Müller Date: Mon, 12 May 2025 16:47:29 +0200 Subject: need error message not error number --- it.class | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/it.class b/it.class index 5de9087..682c897 100644 --- a/it.class +++ b/it.class @@ -1266,7 +1266,7 @@ static function json_encode($data, $p = []) */ static function json_decode($json, $p = []) { - return ($data = json_decode($json, $p['assoc'])) === null && trim($json) != 'null' ? it::error((array)$p['it_error'] + ['title' => "invalid json: " . json_last_error(), 'body' => $json]) : $data; + return ($data = json_decode($json, $p['assoc'])) === null && trim($json) != 'null' ? it::error((array)$p['it_error'] + ['title' => "invalid json: " . json_last_error_msg(), 'body' => $json]) : $data; } /** -- cgit v1.2.3