Corrected condition fallback value in Categories.php API controller

This commit is contained in:
Alex Tselegidis 2020-11-12 14:16:23 +02:00
parent 35f8553300
commit d13df8f8e1

View file

@ -71,7 +71,7 @@ class Categories extends API_V1_Controller {
{ {
try try
{ {
$condition = $id !== NULL ? 'id = ' . $id : ''; $condition = $id !== NULL ? 'id = ' . $id : NULL;
$categories = $this->services_model->get_all_categories($condition); $categories = $this->services_model->get_all_categories($condition);
if ($id !== NULL && count($categories) === 0) if ($id !== NULL && count($categories) === 0)