Calendar: Fix "Object of class EGroupware\Api\DateTime could not be converted to string" error when adding recurrence to an event

This commit is contained in:
nathangray 2021-03-17 09:01:53 -06:00
parent ff1ac017ce
commit f57178e92e

View File

@ -1570,6 +1570,13 @@ class calendar_boupdate extends calendar_bo
// we convert here from user-time to timestamps in server-time!
if (isset($save_event[$ts])) $save_event[$ts] = $save_event[$ts] ? calendar_bo::date2ts($save_event[$ts], true) : 0;
}
foreach(['start','end','recur_enddate'] as $ts)
{
if(is_object($save_event[$ts]))
{
$save_event[$ts] = $save_event[$ts]->format('ts');
}
}
$tracking->track($save_event, $old_event);
return $cal_id;