diff options
author | Kevin Jardine <kevinjardine@yahoo.com> | 2011-11-10 21:32:54 +0100 |
---|---|---|
committer | Kevin Jardine <kevinjardine@yahoo.com> | 2011-11-10 21:32:54 +0100 |
commit | 52326aa6023bea7efc6208ce80f3e78797a3fcc9 (patch) | |
tree | 5ef2453a5c2800a96efb445f2e2fa429e4c7461d /start.php | |
parent | 1520b0b67e7ec0129f40e8795eb7ffde4e7c2aac (diff) | |
download | elgg-52326aa6023bea7efc6208ce80f3e78797a3fcc9.tar.gz elgg-52326aa6023bea7efc6208ce80f3e78797a3fcc9.tar.bz2 |
Added foreach check to avoid a warning
Diffstat (limited to 'start.php')
-rw-r--r-- | start.php | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -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; |