fix PHP 8.0 Unsupported operand types: EGroupware\Api\DateTime + int

This commit is contained in:
Ralf Becker 2021-11-08 13:45:37 +01:00
parent 12a77b2126
commit d343203c20

View File

@ -1667,6 +1667,10 @@ ORDER BY cal_user_type, cal_usre_id
{
$event['recur_enddate'] = Api\DateTime::user2server($event['recur_enddate'], 'ts');
}
if (is_object($old_repeats['recur_enddate']))
{
$old_repeats['recur_enddate'] = Api\DateTime::user2server($old_repeats['recur_enddate'], 'ts');
}
// recurrences need to be truncated
if((int)$event['recur_enddate'] > 0 &&
((int)$old_repeats['recur_enddate'] == 0 || (int)$old_repeats['recur_enddate'] > (int)$event['recur_enddate'])