diff options
author | Dries Buytaert <dries@buytaert.net> | 2006-01-20 09:12:26 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2006-01-20 09:12:26 +0000 |
commit | a177c29622e3131332840b51b742ce068c99da97 (patch) | |
tree | f5c14ea86a9691b9f4559ef1178e7b1c9aafd356 /includes/menu.inc | |
parent | 9c4d4fe7b2d904d3c39c1a00b823e021005048f9 (diff) | |
download | brdo-a177c29622e3131332840b51b742ce068c99da97.tar.gz brdo-a177c29622e3131332840b51b742ce068c99da97.tar.bz2 |
- Patch #40849 by wtanaka and Richard: killed some menu.inc warnings/notices.
Diffstat (limited to 'includes/menu.inc')
-rw-r--r-- | includes/menu.inc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/includes/menu.inc b/includes/menu.inc index 3994c4ed5..cc48396ff 100644 --- a/includes/menu.inc +++ b/includes/menu.inc @@ -650,7 +650,9 @@ function menu_tree($pid = 1) { if (isset($menu['visible'][$pid]) && $menu['visible'][$pid]['children']) { foreach ($menu['visible'][$pid]['children'] as $mid) { - $output .= theme('menu_item', $mid, menu_in_active_trail($mid) || ($menu['visible'][$mid]['type'] & MENU_EXPANDED) ? theme('menu_tree', $mid) : '', count($menu['visible'][$mid]['children']) == 0); + $type = isset($menu['visible'][$mid]['type']) ? $menu['visible'][$mid]['type'] : NULL; + $children = isset($menu['visible'][$mid]['children']) ? $menu['visible'][$mid]['children'] : NULL; + $output .= theme('menu_item', $mid, menu_in_active_trail($mid) || ($type & MENU_EXPANDED) ? theme('menu_tree', $mid) : '', count($children) == 0); } } @@ -1118,7 +1120,7 @@ function _menu_item_is_accessible($mid) { $menu = menu_get_menu(); // Follow the path up to find the first "access" attribute. - $path = $menu['items'][$mid]['path']; + $path = isset($menu['items'][$mid]['path']) ? $menu['items'][$mid]['path'] : NULL; while ($path && (!isset($menu['path index'][$path]) || !isset($menu['items'][$menu['path index'][$path]]['access']))) { $path = substr($path, 0, strrpos($path, '/')); } |