diff --git a/administrator/components/com_categories/models/fields/categoryedit.php b/administrator/components/com_categories/models/fields/categoryedit.php index f655a6ab2f0e1..6d6e19e095108 100644 --- a/administrator/components/com_categories/models/fields/categoryedit.php +++ b/administrator/components/com_categories/models/fields/categoryedit.php @@ -119,7 +119,7 @@ public function __set($name, $value) protected function getOptions() { $options = array(); - $published = $this->element['published'] ?: array(0, 1); + $published = $this->element['published'] ? explode(',', (string) $this->element['published']) : array(0, 1); $name = (string) $this->element['name']; // Let's get the id for the current item, either category or content item. @@ -179,14 +179,7 @@ protected function getOptions() } // Filter on the published state - if (is_numeric($published)) - { - $query->where('a.published = ' . (int) $published); - } - elseif (is_array($published)) - { - $query->where('a.published IN (' . implode(',', ArrayHelper::toInteger($published)) . ')'); - } + $query->where('a.published IN (' . implode(',', ArrayHelper::toInteger($published)) . ')'); // Filter categories on User Access Level // Filter by access level on categories.