mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2025-12-30 00:53:50 +00:00
Functions - Adjust is_json() function for better detection.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user