cast accounts->members(hips) to array, to cope without PHP warnings for not (longer) existing accounts

This commit is contained in:
Ralf Becker 2012-08-09 08:41:29 +00:00
parent 0c5ca986c6
commit cff9872f17
2 changed files with 2 additions and 2 deletions

View File

@ -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;

View File

@ -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;