Skip to content

Commit

Permalink
bug #6705 Update MenuItemMatcher.php, fix menu active status (ywisax)
Browse files Browse the repository at this point in the history
This PR was merged into the 4.x branch.

Discussion
----------

Update MenuItemMatcher.php, fix menu active status

Relate issue: #6704

<!--
Thanks for your contribution! If you are proposing a new feature that is complex,
please open an issue first so we can discuss about it.

Note: all your contributions adhere implicitly to the MIT license
-->

Commits
-------

2695291 Update MenuItemMatcher.php, fix menu active status
  • Loading branch information
javiereguiluz committed Jan 12, 2025
2 parents 8efaa68 + 2695291 commit 25e1df6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Menu/MenuItemMatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ private function doMarkSelectedPrettyUrlsMenuItem(array $menuItems, Request $req
// 2) if no exact match is found, traverse all menu items again and try to find a partial match
$currentUrlWithoutHost = $request->getPathInfo();
$currentUrlQueryParams = $request->query->all();
unset($currentUrlQueryParams['sort'], $currentUrlQueryParams['page']);
unset($currentUrlQueryParams['sort'], $currentUrlQueryParams['page'], $currentUrlQueryParams['query']);
// sort them because menu items always have their query parameters sorted
ksort($currentUrlQueryParams);

Expand Down

0 comments on commit 25e1df6

Please sign in to comment.