mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-08 15:08:59 +01:00
check if array is present before iterating it
This commit is contained in:
parent
8ae3b5f833
commit
ddb0f86257
@ -621,9 +621,12 @@ class calendar_rrule implements Iterator
|
|||||||
{
|
{
|
||||||
$enddate = is_a($event['recur_enddate'],'DateTime') ? $event['recur_enddate'] : new egw_time($event['recur_enddate'],$timestamp_tz);
|
$enddate = is_a($event['recur_enddate'],'DateTime') ? $event['recur_enddate'] : new egw_time($event['recur_enddate'],$timestamp_tz);
|
||||||
}
|
}
|
||||||
foreach($event['recur_exception'] as $exception)
|
if (is_array($event['recur_exception']))
|
||||||
{
|
{
|
||||||
$exceptions[] = is_a($exception,'DateTime') ? $exception : new egw_time($exception,$timestamp_tz);
|
foreach($event['recur_exception'] as $exception)
|
||||||
|
{
|
||||||
|
$exceptions[] = is_a($exception,'DateTime') ? $exception : new egw_time($exception,$timestamp_tz);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return new calendar_rrule($time,$event['recur_type'],$event['recur_interval'],$enddate,$event['recur_data'],$exceptions);
|
return new calendar_rrule($time,$event['recur_type'],$event['recur_interval'],$enddate,$event['recur_data'],$exceptions);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user