From ac6d9e5c458e1bb471e5a2414fd7f1e6a73f6e84 Mon Sep 17 00:00:00 2001 From: fusionate Date: Mon, 31 Jul 2023 23:27:15 +0000 Subject: [PATCH] Functions - Adjust is_json() function for better detection. --- resources/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/functions.php b/resources/functions.php index 0041be546e..ea0c1c56c2 100644 --- a/resources/functions.php +++ b/resources/functions.php @@ -1484,7 +1484,7 @@ function number_pad($number,$n) { //json detection if (!function_exists('is_json')) { function is_json($str) { - return (is_string($str) && is_object(json_decode($str))) ? true : false; + return is_string($str) && is_array(json_decode($str, true)) ? true : false; } }