diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2008-10-08 01:42:16 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2008-10-08 01:42:16 +0000 |
commit | 34ec8f9834579098308308c85be484fe5b771995 (patch) | |
tree | 8fa87528149a5b34b050ae5d311be120e96a5a62 /includes | |
parent | 39fad4e75b5e70922002de249fc03ce59657a8a1 (diff) | |
download | brdo-34ec8f9834579098308308c85be484fe5b771995.tar.gz brdo-34ec8f9834579098308308c85be484fe5b771995.tar.bz2 |
#261148 by chx and pwolanin: Allow recovery from a failed menu build.
Diffstat (limited to 'includes')
-rw-r--r-- | includes/menu.inc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/includes/menu.inc b/includes/menu.inc index 312812aa0..a92481634 100644 --- a/includes/menu.inc +++ b/includes/menu.inc @@ -387,7 +387,9 @@ function menu_execute_active_handler($path = NULL) { if (_menu_site_is_offline()) { return MENU_SITE_OFFLINE; } - if (variable_get('menu_rebuild_needed', FALSE)) { + // Rebuild if we know it's needed, or if the menu masks are missing which + // occurs rarely, likely due to a race condition of multiple rebuilds. + if (variable_get('menu_rebuild_needed', FALSE) || !variable_get('menu_masks', array())) { menu_rebuild(); } if ($router_item = menu_get_item($path)) { |