diff options
-rw-r--r-- | engine/lib/navigation.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/engine/lib/navigation.php b/engine/lib/navigation.php index 5e03641a1..1a0aa51a0 100644 --- a/engine/lib/navigation.php +++ b/engine/lib/navigation.php @@ -35,13 +35,15 @@ function elgg_register_menu_item($menu_name, $menu_item) { } if (is_array($menu_item)) { - $menu_item = ElggMenuItem::factory($menu_item); - if (!$menu_item) { + $item = ElggMenuItem::factory($menu_item); + if (!$item) { + elgg_log("Unable to add menu item '{$menu_item['name']}' to '$menu_name' menu", 'WARNING'); + elgg_log(print_r($menu_item, true), 'DEBUG'); return false; } } - $CONFIG->menus[$menu_name][] = $menu_item; + $CONFIG->menus[$menu_name][] = $item; return true; } |