Skip to content
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

[4.0] Active menu does not exist, fatal error #31156

Merged
merged 1 commit into from
Oct 22, 2020
Merged

Conversation

sakiss
Copy link
Contributor

@sakiss sakiss commented Oct 19, 2020

Pull Request for Issue # .#30812
Follow up of PR: #31100

Summary of Changes

$app->getMenu()->getActive();
can return a MenuItem or null

by calling a function when null is returned, it generates a fatal error.

Testing Instructions

Add a dummy/non existent ItemId in your non sef urls.
E.g. /index.php?option=com_content&view=article&id=2:another-article&catid=9&itemId=5000
In that case there is no menu item with id 5000

Actual result BEFORE applying this Pull Request

Screenshot_joomla_missing_menu_ietm

Expected result AFTER applying this Pull Request

No fatal error

Documentation Changes Required

No

@sakiss sakiss changed the title Fix null menu [4.0] Active menu does not exist, fatal error Oct 19, 2020
@ghost
Copy link

ghost commented Oct 19, 2020

I have tested this item ✅ successfully on d8568dd


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/31156.

@laoneo
Copy link
Member

laoneo commented Oct 21, 2020

I have tested this item ✅ successfully on d8568dd


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/31156.

@richard67
Copy link
Member

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/31156.

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Oct 21, 2020
@richard67 richard67 added this to the Joomla 4.0 milestone Oct 21, 2020
@rdeutz rdeutz merged commit 0e3beac into joomla:4.0-dev Oct 22, 2020
@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Oct 22, 2020
@sakiss sakiss deleted the null_menu branch October 22, 2020 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants