Skip to content

Commit 9272ce1

Browse files
authored
[5.4] check if state is initialized in content CategoryModel (joomla#46316)
Fix regression from joomla#45704
1 parent 25cba3b commit 9272ce1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

components/com_content/src/Model/CategoryModel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ public function getPagination()
335335
public function getCategory()
336336
{
337337
if (!\is_object($this->_item)) {
338-
if (!empty($this->state->get('params'))) {
338+
if (isset($this->state) && !empty($this->state->get('params'))) {
339339
$params = $this->state->get('params');
340340
$options = [];
341341
$options['countItems'] = $params->get('show_cat_num_articles', 1) || !$params->get('show_empty_categories_cat', 0);

0 commit comments

Comments
 (0)