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 a125be6074
commit c6761665cf

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'])