From 52326aa6023bea7efc6208ce80f3e78797a3fcc9 Mon Sep 17 00:00:00 2001 From: Kevin Jardine Date: Thu, 10 Nov 2011 21:32:54 +0100 Subject: Added foreach check to avoid a warning --- start.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/start.php b/start.php index 03f1a183a..b8c79ca37 100644 --- a/start.php +++ b/start.php @@ -49,7 +49,6 @@ function event_calendar_init() { // TODO - are the left and right values still relevant for Elgg 1.8? $group_calendar = elgg_get_plugin_setting('group_calendar', 'event_calendar'); if (!$group_calendar || $group_calendar != 'no') { - // add blog link to elgg_register_plugin_hook_handler('register', 'menu:owner_block', 'event_calendar_owner_block_menu'); $group_profile_display = elgg_get_plugin_setting('group_profile_display', 'event_calendar'); if (!$group_profile_display || $group_profile_display == 'right') { @@ -339,7 +338,7 @@ function event_calendar_entity_menu_prepare($hook, $type, $return, $params) { // remove access level from listings if (elgg_in_context('event_calendar') && !elgg_in_context('event_calendar:view')) { $new_return = array(); - if ($return['default']) { + if (isset($return['default']) && is_array($return['default'])) { foreach($return['default'] AS $item) { if ($item->getName() != 'access') { $new_return[] = $item; -- cgit v1.2.3