From 874b4b594f749081db5983b9f571e5cd8084a4aa Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Wed, 12 Feb 2014 11:59:32 +0000 Subject: [PATCH] Fix warning "Argument #1 is not an array" in calendar conflict --- calendar/inc/class.calendar_boupdate.inc.php | 2 +- calendar/inc/class.calendar_uiforms.inc.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/calendar/inc/class.calendar_boupdate.inc.php b/calendar/inc/class.calendar_boupdate.inc.php index 22fcb94fc2..998e46146f 100644 --- a/calendar/inc/class.calendar_boupdate.inc.php +++ b/calendar/inc/class.calendar_boupdate.inc.php @@ -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( diff --git a/calendar/inc/class.calendar_uiforms.inc.php b/calendar/inc/class.calendar_uiforms.inc.php index de857895f1..04808bd27c 100644 --- a/calendar/inc/class.calendar_uiforms.inc.php +++ b/calendar/inc/class.calendar_uiforms.inc.php @@ -1791,13 +1791,13 @@ 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 );