From d13df8f8e12719b03668aff04218225bdffa3033 Mon Sep 17 00:00:00 2001 From: Alex Tselegidis Date: Thu, 12 Nov 2020 14:16:23 +0200 Subject: [PATCH] Corrected condition fallback value in Categories.php API controller --- application/controllers/api/v1/Categories.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/controllers/api/v1/Categories.php b/application/controllers/api/v1/Categories.php index 3e1c8b86..6e9d3aca 100644 --- a/application/controllers/api/v1/Categories.php +++ b/application/controllers/api/v1/Categories.php @@ -71,7 +71,7 @@ class Categories extends API_V1_Controller { { try { - $condition = $id !== NULL ? 'id = ' . $id : ''; + $condition = $id !== NULL ? 'id = ' . $id : NULL; $categories = $this->services_model->get_all_categories($condition); if ($id !== NULL && count($categories) === 0)