aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Jardine <kevinjardine@yahoo.com>2011-11-10 21:32:54 +0100
committerKevin Jardine <kevinjardine@yahoo.com>2011-11-10 21:32:54 +0100
commit52326aa6023bea7efc6208ce80f3e78797a3fcc9 (patch)
tree5ef2453a5c2800a96efb445f2e2fa429e4c7461d
parent1520b0b67e7ec0129f40e8795eb7ffde4e7c2aac (diff)
downloadelgg-52326aa6023bea7efc6208ce80f3e78797a3fcc9.tar.gz
elgg-52326aa6023bea7efc6208ce80f3e78797a3fcc9.tar.bz2
Added foreach check to avoid a warning
-rw-r--r--start.php3
1 files changed, 1 insertions, 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;