diff --git a/administrator/components/com_content/models/articles.php b/administrator/components/com_content/models/articles.php index 0d28a2ae90d5c..6a5aa3c4bc62e 100644 --- a/administrator/components/com_content/models/articles.php +++ b/administrator/components/com_content/models/articles.php @@ -267,12 +267,13 @@ protected function getListQuery() } // Filter by categories and by level - $categoryId = $this->getState('filter.category_id'); + $categoryId = $this->getState('filter.category_id', array()); $level = $this->getState('filter.level'); - $categoryId = $categoryId && !is_array($categoryId) - ? array($categoryId) - : $categoryId; + if (!is_array($categoryId)) + { + $categoryId = $categoryId ? array($categoryId) : array(); + } // Case: Using both categories filter and by level filter if (count($categoryId)) diff --git a/libraries/src/Updater/Adapter/CollectionAdapter.php b/libraries/src/Updater/Adapter/CollectionAdapter.php index 45e0f1afbb18e..9313bf52613ed 100644 --- a/libraries/src/Updater/Adapter/CollectionAdapter.php +++ b/libraries/src/Updater/Adapter/CollectionAdapter.php @@ -50,16 +50,18 @@ class CollectionAdapter extends UpdateAdapter protected $pop_parent = 0; /** - * @var array A list of discovered update sites + * A list of discovered update sites + * + * @var array */ - protected $update_sites; + protected $update_sites = array(); /** * A list of discovered updates * - * @var array + * @var array */ - protected $updates; + protected $updates = array(); /** * Gets the reference to the current direct parent diff --git a/modules/mod_tags_similar/helper.php b/modules/mod_tags_similar/helper.php index 82ee15f6ad115..f4b1686c445be 100644 --- a/modules/mod_tags_similar/helper.php +++ b/modules/mod_tags_similar/helper.php @@ -23,7 +23,7 @@ abstract class ModTagssimilarHelper * * @param Registry &$params Module parameters * - * @return mixed Results array / null + * @return array */ public static function getList(&$params) { @@ -35,7 +35,7 @@ public static function getList(&$params) // This module does not apply to list views in general at this point. if ($option === 'com_tags' || $view === 'category' || $option === 'com_users') { - return; + return array(); } $db = JFactory::getDbo(); @@ -54,7 +54,7 @@ public static function getList(&$params) if (!$tagsToMatch || $tagsToMatch === null) { - return; + return array(); } $tagCount = substr_count($tagsToMatch, ',') + 1;