diff --git a/administrator/components/com_categories/models/category.php b/administrator/components/com_categories/models/category.php index f5b866c09cafc..4bd98e8b7495d 100644 --- a/administrator/components/com_categories/models/category.php +++ b/administrator/components/com_categories/models/category.php @@ -323,9 +323,9 @@ protected function loadFormData() $extension = substr($app->getUserState('com_categories.categories.filter.extension'), 4); $filters = (array) $app->getUserState('com_categories.categories.' . $extension . '.filter'); - $data->set('published', $app->input->getInt('published', (isset($filters['published']) ? $filters['published'] : null))); - $data->set('language', $app->input->getString('language', (isset($filters['language']) ? $filters['language'] : null))); - $data->set('access', $app->input->getInt('access', (isset($filters['access']) ? $filters['access'] : null))); + $data->set('published', $app->input->getInt('published', (!empty($filters['published']) ? $filters['published'] : null))); + $data->set('language', $app->input->getString('language', (!empty($filters['language']) ? $filters['language'] : null))); + $data->set('access', $app->input->getInt('access', (!empty($filters['access']) ? $filters['access'] : JFactory::getConfig()->get('access')))); } } diff --git a/administrator/components/com_content/models/article.php b/administrator/components/com_content/models/article.php index 5ffca55b1df7c..d57721a75bc5e 100644 --- a/administrator/components/com_content/models/article.php +++ b/administrator/components/com_content/models/article.php @@ -423,10 +423,10 @@ protected function loadFormData() if ($this->getState('article.id') == 0) { $filters = (array) $app->getUserState('com_content.articles.filter'); - $data->set('state', $app->input->getInt('state', (isset($filters['published']) ? $filters['published'] : null))); - $data->set('catid', $app->input->getInt('catid', (isset($filters['category_id']) ? $filters['category_id'] : null))); - $data->set('language', $app->input->getString('language', (isset($filters['language']) ? $filters['language'] : null))); - $data->set('access', $app->input->getInt('access', (isset($filters['access']) ? $filters['access'] : null))); + $data->set('state', $app->input->getInt('state', (!empty($filters['published']) ? $filters['published'] : null))); + $data->set('catid', $app->input->getInt('catid', (!empty($filters['category_id']) ? $filters['category_id'] : null))); + $data->set('language', $app->input->getString('language', (!empty($filters['language']) ? $filters['language'] : null))); + $data->set('access', $app->input->getInt('access', (!empty($filters['access']) ? $filters['access'] : JFactory::getConfig()->get('access')))); } } diff --git a/administrator/components/com_modules/models/module.php b/administrator/components/com_modules/models/module.php index 6cd83d5a45a0e..2d165b86c51ab 100644 --- a/administrator/components/com_modules/models/module.php +++ b/administrator/components/com_modules/models/module.php @@ -596,10 +596,10 @@ protected function loadFormData() if (!$data->id) { $filters = (array) $app->getUserState('com_modules.modules.filter'); - $data->set('published', $app->input->getInt('published', (isset($filters['state']) ? $filters['state'] : null))); - $data->set('position', $app->input->getInt('position', (isset($filters['position']) ? $filters['position'] : null))); - $data->set('language', $app->input->getString('language', (isset($filters['language']) ? $filters['language'] : null))); - $data->set('access', $app->input->getInt('access', (isset($filters['access']) ? $filters['access'] : null))); + $data->set('published', $app->input->getInt('published', (!empty($filters['state']) ? $filters['state'] : null))); + $data->set('position', $app->input->getInt('position', (!empty($filters['position']) ? $filters['position'] : null))); + $data->set('language', $app->input->getString('language', (!empty($filters['language']) ? $filters['language'] : null))); + $data->set('access', $app->input->getInt('access', (!empty($filters['access']) ? $filters['access'] : JFactory::getConfig()->get('access')))); } // This allows us to inject parameter settings into a new module.