From cff9872f1723754ef9e7b8d12d28517beb3436f6 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 9 Aug 2012 08:41:29 +0000 Subject: [PATCH] cast accounts->members(hips) to array, to cope without PHP warnings for not (longer) existing accounts --- calendar/inc/class.calendar_bo.inc.php | 2 +- calendar/inc/class.calendar_boupdate.inc.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/calendar/inc/class.calendar_bo.inc.php b/calendar/inc/class.calendar_bo.inc.php index aea491c444..db82d399a6 100644 --- a/calendar/inc/class.calendar_bo.inc.php +++ b/calendar/inc/class.calendar_bo.inc.php @@ -1145,7 +1145,7 @@ class calendar_bo { foreach($event['participants'] as $uid => $accept) { - if ($uid == $user || $uid < 0 && in_array($user,$GLOBALS['egw']->accounts->members($uid,true))) + if ($uid == $user || $uid < 0 && in_array($user, (array)$GLOBALS['egw']->accounts->members($uid,true))) { // if we are a participant, we have an implicite FREEBUSY, READ and PRIVAT grant $grant |= EGW_ACL_FREEBUSY | EGW_ACL_READ | EGW_ACL_PRIVATE; diff --git a/calendar/inc/class.calendar_boupdate.inc.php b/calendar/inc/class.calendar_boupdate.inc.php index e532b7312b..af5035e368 100644 --- a/calendar/inc/class.calendar_boupdate.inc.php +++ b/calendar/inc/class.calendar_boupdate.inc.php @@ -241,7 +241,7 @@ class calendar_boupdate extends calendar_bo if ($uid < 0) // group, check it's members too { - $users += $GLOBALS['egw']->accounts->members($uid,true); + $users += (array)$GLOBALS['egw']->accounts->members($uid,true); $users = array_unique($users); } $users[] = $uid;