aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/navigation.php
diff options
context:
space:
mode:
authorewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-25 19:59:38 +0000
committerewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-25 19:59:38 +0000
commit241e22f5c219dde0b1352f26dbb651c2f564913c (patch)
treefe0a6935bde5a6b69ef6ddcacb02e7fe29ea91c8 /engine/lib/navigation.php
parent72de53f6b9cf475e73271bda388f3097adc625e8 (diff)
downloadelgg-241e22f5c219dde0b1352f26dbb651c2f564913c.tar.gz
elgg-241e22f5c219dde0b1352f26dbb651c2f564913c.tar.bz2
Emit a warning + debug info when an attempt to register a menu item fails
git-svn-id: http://code.elgg.org/elgg/trunk@8470 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/navigation.php')
-rw-r--r--engine/lib/navigation.php8
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;
}