diff options
-rw-r--r-- | includes/menu.inc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/includes/menu.inc b/includes/menu.inc index d5e45a0c5..312812aa0 100644 --- a/includes/menu.inc +++ b/includes/menu.inc @@ -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]; |