From 36f287e1695d67101beac1894d8f787b5be33a65 Mon Sep 17 00:00:00 2001 From: Yasen Pramatarov Date: Wed, 23 Oct 2024 13:22:55 +0300 Subject: [PATCH] Fixes json escaping --- app/classes/agent.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/classes/agent.php b/app/classes/agent.php index d8bf270..fbaf13c 100644 --- a/app/classes/agent.php +++ b/app/classes/agent.php @@ -245,7 +245,8 @@ class Agent { } // Cache the result and the timestamp if the response is successful - $_SESSION[$agent_cache_name] = $response; + // We decode it so that it's pure JSON and not escaped + $_SESSION[$agent_cache_name] = json_decode($response, true); $_SESSION[$agent_cache_time] = time(); return $response;