? ? Success

User tests: Successful: Unsuccessful:

avatar sakiss
sakiss
19 Oct 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

avatar sakiss sakiss - open - 19 Oct 2020
avatar sakiss sakiss - change - 19 Oct 2020
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 19 Oct 2020
Category Front End Templates (site)
avatar sakiss sakiss - change - 19 Oct 2020
Title
Fix null menu
[4.0] Active menu does not exist, fatal error
avatar sakiss sakiss - edited - 19 Oct 2020
avatar sakiss sakiss - change - 19 Oct 2020
The description was changed
avatar sakiss sakiss - edited - 19 Oct 2020
avatar gostn gostn - test_item - 19 Oct 2020 - Tested successfully
avatar gostn
gostn - comment - 19 Oct 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.

avatar laoneo laoneo - test_item - 21 Oct 2020 - Tested successfully
avatar laoneo
laoneo - comment - 21 Oct 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.

avatar richard67 richard67 - change - 21 Oct 2020
Status Pending Ready to Commit
avatar richard67
richard67 - comment - 21 Oct 2020

RTC


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

avatar richard67 richard67 - change - 21 Oct 2020
Labels Added: ? ?
avatar rdeutz rdeutz - close - 22 Oct 2020
avatar rdeutz rdeutz - merge - 22 Oct 2020
avatar rdeutz rdeutz - change - 22 Oct 2020
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2020-10-22 08:35:07
Closed_By rdeutz

Add a Comment

Login with GitHub to post a comment