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 71ffd661ac
commit 5946e9f7cd

View File

@ -1920,7 +1920,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'));
}