From 794901847d0ae46a394578b085dc8298bfeba923 Mon Sep 17 00:00:00 2001 From: int2001 Date: Sat, 19 Aug 2023 05:02:50 +0000 Subject: [PATCH] return Empty array when no favs --- application/controllers/User_options.php | 1 + 1 file changed, 1 insertion(+) diff --git a/application/controllers/User_options.php b/application/controllers/User_options.php index 46d1150d..3aa337de 100755 --- a/application/controllers/User_options.php +++ b/application/controllers/User_options.php @@ -27,6 +27,7 @@ class User_Options extends CI_Controller { public function get_fav() { $result=$this->user_options_model->get_options('Favourite'); + $jsonout=[]; foreach($result->result() as $options) { $jsonout[$options->option_name][$options->option_key]=$options->option_value; }