aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-03-05 23:58:05 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-03-05 23:58:05 +0000
commit31efd99cee3807df11948dc31110fed4c513d54f (patch)
tree547be01042c08d52761648d92551cd86fd2c4f8b
parent64eae5d12eba03a9cd1abbd790ffbfb381370a73 (diff)
downloadelgg-31efd99cee3807df11948dc31110fed4c513d54f.tar.gz
elgg-31efd99cee3807df11948dc31110fed4c513d54f.tar.bz2
added a catch to menu builder for bad menu items
git-svn-id: http://code.elgg.org/elgg/trunk@8605 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r--engine/classes/ElggMenuBuilder.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/engine/classes/ElggMenuBuilder.php b/engine/classes/ElggMenuBuilder.php
index bafed2cea..dcf147d19 100644
--- a/engine/classes/ElggMenuBuilder.php
+++ b/engine/classes/ElggMenuBuilder.php
@@ -66,7 +66,10 @@ class ElggMenuBuilder {
// get menu items for this context
$selected_menu = array();
foreach ($this->menu as $menu_item) {
- //var_dump($menu_item);
+ if (!is_object($menu_item)) {
+ elgg_log("A non-object was passed to ElggMenuBuilder", "ERROR");
+ continue;
+ }
if ($menu_item->inContext()) {
$selected_menu[] = $menu_item;
}