diff options
author | webchick <webchick@24967.no-reply.drupal.org> | 2012-04-12 00:23:01 -0700 |
---|---|---|
committer | webchick <webchick@24967.no-reply.drupal.org> | 2012-04-12 00:23:01 -0700 |
commit | 9824d7ac2502bb63501f53df24b8f17d18b2a242 (patch) | |
tree | f1c340a8d6331ab6e14045271dd4c1dcd588ea4f /includes/menu.inc | |
parent | 541cf80f64edcf1b520c20073455dd9c1557ecfe (diff) | |
download | brdo-9824d7ac2502bb63501f53df24b8f17d18b2a242.tar.gz brdo-9824d7ac2502bb63501f53df24b8f17d18b2a242.tar.bz2 |
Issue #918356 by David_Rothstein, franz, tekante, dstol, mikestefff: Fixed WSOD when drupal_get_title() called during hook_init() and custom 403 or 404 pages are being used.
Diffstat (limited to 'includes/menu.inc')
-rw-r--r-- | includes/menu.inc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/includes/menu.inc b/includes/menu.inc index 15978a32a..5c294c111 100644 --- a/includes/menu.inc +++ b/includes/menu.inc @@ -2313,6 +2313,9 @@ function menu_get_active_menu_names() { */ function menu_set_active_item($path) { $_GET['q'] = $path; + // Since the active item has changed, the active menu trail may also be out + // of date. + drupal_static_reset('menu_set_active_trail'); } /** @@ -2398,7 +2401,7 @@ function menu_set_active_trail($new_trail = NULL) { // appending either the preferred link or the menu router item for the // current page. Exclude it if we are on the front page. $last = end($trail); - if ($last['href'] != $preferred_link['href'] && !drupal_is_front_page()) { + if ($preferred_link && $last['href'] != $preferred_link['href'] && !drupal_is_front_page()) { $trail[] = $preferred_link; } } |