From 55d9f86b22a21353873c0d4a14bae4944df615b6 Mon Sep 17 00:00:00 2001 From: Klaus Leithoff Date: Fri, 21 Jun 2013 09:58:55 +0000 Subject: [PATCH] silence php warning on copy event, when no alarm ios set --- calendar/inc/class.calendar_uiforms.inc.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/calendar/inc/class.calendar_uiforms.inc.php b/calendar/inc/class.calendar_uiforms.inc.php index 244a37c708..24423b412e 100644 --- a/calendar/inc/class.calendar_uiforms.inc.php +++ b/calendar/inc/class.calendar_uiforms.inc.php @@ -506,10 +506,13 @@ class calendar_uiforms extends calendar_ui } // Copy alarms - foreach($event['alarm'] as $n => &$alarm) + if (is_array($event['alarm'])) { - unset($alarm['id']); - unset($alarm['cal_id']); + foreach($event['alarm'] as $n => &$alarm) + { + unset($alarm['id']); + unset($alarm['cal_id']); + } } // Get links to be copied