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 09:08:45 +00:00
parent 188e2f8038
commit e83a7c1b8d

View File

@ -465,8 +465,8 @@ class calendar_ical extends calendar_boupdate
case 'g':
$cutype = 'GROUP';
$participantURL = 'urn:uuid:'.common::generate_uid('accounts', $uid);
$members = $GLOBALS['egw']->accounts->members($uid, true);
if (!isset($event['participants'][$this->user]) && in_array($this->user, $members))
if (!isset($event['participants'][$this->user]) &&
($members = $GLOBALS['egw']->accounts->members($uid, true)) && in_array($this->user, $members))
{
$user = $this->resource_info($this->user);
$attributes['ATTENDEE'][] = 'MAILTO:' . $user['email'];
@ -2826,8 +2826,8 @@ class calendar_ical extends calendar_boupdate
$status != 'X' && $status != 'U')
{
// User tries to reply to the group invitiation
$members = $GLOBALS['egw']->accounts->members($uid, true);
if (in_array($this->user, $members))
if (($members = $GLOBALS['egw']->accounts->members($uid, true)) &&
in_array($this->user, $members))
{
//Horde::logMessage("vevent2egw: set status to " . $status,
// __FILE__, __LINE__, PEAR_LOG_DEBUG);