fixed 2 warnings

This commit is contained in:
Ralf Becker 2013-08-15 10:39:06 +00:00
parent a5262b6cf9
commit 2406d1216f

View File

@ -601,6 +601,7 @@ class calendar_uiforms extends calendar_ui
$event['recurrence'] = $content['edit_single']; $event['recurrence'] = $content['edit_single'];
unset($event['id']); unset($event['id']);
// modifiy alarms for the exception, unsetting alarm-id to create new alarms // modifiy alarms for the exception, unsetting alarm-id to create new alarms
if (!is_array($event['alarm'])) $event['alarm'] = array();
foreach($event['alarm'] as $n => &$alarm) foreach($event['alarm'] as $n => &$alarm)
{ {
unset($alarm['id']); unset($alarm['id']);
@ -783,7 +784,7 @@ class calendar_uiforms extends calendar_ui
{ {
if ($edit_series_confirmed) // series moved by splitting in two if ($edit_series_confirmed) // series moved by splitting in two
{ {
foreach ($old_alarms as $alarm) foreach ((array)$old_alarms as $alarm)
{ {
// check if alarms still needed in old event, if not delete it // check if alarms still needed in old event, if not delete it
$event_time = $alarm['time'] + $alarm['offset']; $event_time = $alarm['time'] + $alarm['offset'];