Skip to content
Snippets Groups Projects
Commit 77dc67ec authored by Gerhard Killesreiter's avatar Gerhard Killesreiter
Browse files

#56415, menu_set_location (menu_set_active) mangles $_GET/arg(), patch by JonBob

parent 27e562e3
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
...@@ -328,6 +328,10 @@ function menu_set_location($location) { ...@@ -328,6 +328,10 @@ function menu_set_location($location) {
$temp_id = min(array_keys($_menu['items'])) - 1; $temp_id = min(array_keys($_menu['items'])) - 1;
$prev_id = 0; $prev_id = 0;
// Don't allow this function to change the actual current path, just the
// position in the menu tree.
$location[count($location) - 1]['path'] = $_GET['q'];
foreach (array_reverse($location) as $item) { foreach (array_reverse($location) as $item) {
if (isset($_menu['path index'][$item['path']])) { if (isset($_menu['path index'][$item['path']])) {
$mid = $_menu['path index'][$item['path']]; $mid = $_menu['path index'][$item['path']];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment