From d6eeaf6043f11e41dd98f24b65b1d2811b896f3b Mon Sep 17 00:00:00 2001 From: ghost Date: Wed, 14 Feb 2024 22:55:21 +0200 Subject: [PATCH] fix json detection --- src/Manticore.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Manticore.php b/src/Manticore.php index 9b78f3b..a45362c 100644 --- a/src/Manticore.php +++ b/src/Manticore.php @@ -342,7 +342,7 @@ class Manticore case is_string($value) && !preg_match('/\s/', $value) && base64_encode((string) base64_decode($value, true)) === $value: return self::TYPE_BASE_64; - case is_string($value) && json_encode(json_decode($value)) === $value: + case is_string($value) && !is_numeric($value) && json_encode(json_decode($value)) === $value: return self::TYPE_JSON; case is_string($value) && 1 === preg_match('/<\/[^>]+>/', $value):