Skip to content
Snippets Groups Projects
Commit ccdeae8d authored by Angie Byron's avatar Angie Byron
Browse files

#238760 follow-up by pwolanin: Forward-port rest of 6.x fix for menu_rebuild() race condition.

parent 784b01b1
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
......@@ -2340,10 +2340,11 @@ function _menu_router_build($callbacks) {
}
array_multisort($sort, SORT_NUMERIC, $menu);
if ($menu) {
// Delete the existing router since we have some data to replace it.
db_query('DELETE FROM {menu_router}');
if (!$menu) {
return array();
}
// Delete the existing router since we have some data to replace it.
db_query('DELETE FROM {menu_router}');
// Apply inheritance rules.
foreach ($menu as $path => $v) {
$item = &$menu[$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