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)