Skip to content

Commit

Permalink
[2.5.21] Fix PHP Warning: Attempt to read property "query" on null
Browse files Browse the repository at this point in the history
  • Loading branch information
sonvnn committed Sep 19, 2022
1 parent 163139b commit 821569b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion framework/article.php
Expand Up @@ -49,7 +49,7 @@ function __construct($article, $categoryView = false)
if ($itemId) {
$menu = $mainframe->getMenu();
$item = $menu->getItem($itemId);
if ($item->query['option'] == 'com_content' && ($item->query['view'] == 'category' || $item->query['view'] == 'article' || $item->query['view'] == 'featured')) {
if (isset($item->query) && is_array($item->query) && $item->query['option'] == 'com_content' && ($item->query['view'] == 'category' || $item->query['view'] == 'article' || $item->query['view'] == 'featured')) {
$this->params = $item->getParams();
}
}
Expand Down

0 comments on commit 821569b

Please sign in to comment.