From c1db2b636c87c5e45a67d9b1080f3c7306f1733d Mon Sep 17 00:00:00 2001 From: Alex Tselegidis Date: Wed, 27 Oct 2021 11:44:45 +0200 Subject: [PATCH] The content array must be encoded before returned --- application/helpers/http_helper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/helpers/http_helper.php b/application/helpers/http_helper.php index dd52d94a..6a88cbb8 100644 --- a/application/helpers/http_helper.php +++ b/application/helpers/http_helper.php @@ -120,7 +120,7 @@ if ( ! function_exists('json_response')) ->output ->set_status_header($status) ->set_content_type('application/json') - ->set_output($content); + ->set_output(json_encode($content)); } }