Fix warning "Argument #1 is not an array" in calendar conflict

This commit is contained in:
Hadi Nategh 2014-02-12 11:59:32 +00:00
parent 22b66c9e3d
commit 874b4b594f
2 changed files with 4 additions and 4 deletions

View File

@ -330,7 +330,7 @@ class calendar_boupdate extends calendar_bo
{
foreach($conflicts as $key => $conflict)
{
$conflict['participants'] = array_intersect_key($conflict['participants'],$event['participants']);
$conflict['participants'] = array_intersect_key((array)$conflict['participants'],$event['participants']);
if (!$this->check_perms(EGW_ACL_READ,$conflict))
{
$conflicts[$key] = array(

View File

@ -1791,12 +1791,12 @@ class calendar_uiforms extends calendar_ui
'tooltip_participants' => $is_readable ? implode(', ',$this->bo->participants($conflict)) : '',
'time' => $this->bo->long_date($conflict['start'],$conflict['end'],true),
'conflicting_participants' => implode(",\n",$this->bo->participants(array(
'participants' => array_intersect_key($conflict['participants'],$event['participants']),
'participants' => array_intersect_key((array)$conflict['participants'],$event['participants']),
),true,true)), // show group invitations too
'icon_recur' => $conflict['recur_type'] != MCAL_RECUR_NONE ? 'recur' : '',
'text_recur' => $conflict['recur_type'] != MCAL_RECUR_NONE ? lang('Recurring event') : ' ',
);
$allConflicts += array_intersect_key($conflict['participants'],$event['participants']);
$allConflicts += array_intersect_key((array)$conflict['participants'],$event['participants']);
}
$content = $event + array(
'conflicts' => array_values($conflicts), // conflicts have id-start as key