Avoid errors if $instance_date is not passed correctly

(thanks, Scrutenizer)
This commit is contained in:
nathangray 2017-01-31 09:14:50 -07:00
parent ca3a660532
commit c830e494e6

View File

@ -1955,7 +1955,7 @@ class calendar_boupdate extends calendar_bo
foreach($event['alarm'] as &$alarm)
{
if($event['recur_type'] != MCAL_RECUR_NONE)
if($event['recur_type'] != MCAL_RECUR_NONE && is_object($instance_date))
{
calendar_so::shift_alarm($event, $alarm, $instance_date->format('ts'));
}