Commit ccdeae8d authored by webchick's avatar webchick
Browse files

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

parent 784b01b1
......@@ -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];
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment