Skip to content
Snippets Groups Projects
Commit 441ea23b authored by Dries Buytaert's avatar Dries Buytaert
Browse files

- Patch #682784 by andrewfn: once created, menu item query strings could never be deleted.

parent df6ae20b
Branches
Tags
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
......@@ -348,9 +348,17 @@ function menu_edit_item_validate($form, &$form_state) {
if (isset($parsed_link['query'])) {
$item['options']['query'] = drupal_get_query_array($parsed_link['query']);
}
else {
// Use unset() rather than setting to empty string
// to avoid redundant serialized data being stored.
unset($item['options']['query']);
}
if (isset($parsed_link['fragment'])) {
$item['options']['fragment'] = $parsed_link['fragment'];
}
else {
unset($item['options']['fragment']);
}
if ($item['link_path'] != $parsed_link['path']) {
$item['link_path'] = $parsed_link['path'];
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment