New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix for issue #15498 #15499
Fix for issue #15498 #15499
Conversation
@@ -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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add:
&& isset($query['view'])
below changed line?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No - that's not related to this bug - it needs to go in a separate Pull Request
I have tested this item ✅ successfully on 87ba5af This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/15499. |
2 similar comments
I have tested this item ✅ successfully on 87ba5af This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/15499. |
I have tested this item ✅ successfully on 87ba5af This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/15499. |
RTC. This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/15499. |
Pull Request for Issue #15498 .
Summary of Changes
It's bad practice to typehint against a stdClass instance. Instead it's better to check we don't get
null
back fromJMenu::getActive
orJMenu::getItem
Testing Instructions
Install staging with sample testing data. Go to the featured articles page. Before patch the home page has a url like
JROOT/index.php/19-sample-data-articles/joomla/24-joomla
. After the patch it should be JROOT/index.phpDocumentation Changes Required
None