aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;
}