diff --git a/components/com_content/helpers/legacyrouter.php b/components/com_content/helpers/legacyrouter.php index b5f4f05c608cf..de431dba5ef83 100644 --- a/components/com_content/helpers/legacyrouter.php +++ b/components/com_content/helpers/legacyrouter.php @@ -91,7 +91,7 @@ public function build(&$query, &$segments) } // Are we dealing with an article or category that is attached to a menu item? - if (($menuItem instanceof stdClass) + if ($menuItem !== null && $menuItem->query['view'] == $query['view'] && isset($query['id']) && $menuItem->query['id'] == (int) $query['id'])