Merge pull request #43282 from nextcloud/backport/42696/stable28

[stable28] fix(caldav): only call getTimestamp() on actual DateTime data
This commit is contained in:
Ferdinand Thiessen 2024-02-03 15:26:31 +01:00 committed by GitHub
commit d0295750b9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -106,8 +106,7 @@ class StatusService {
if (isset($component['DTSTART']) && $userStatusTimestamp !== null) {
/** @var DateTimeImmutable $dateTime */
$dateTime = $component['DTSTART'][0];
$timestamp = $dateTime->getTimestamp();
if($userStatusTimestamp > $timestamp) {
if($dateTime instanceof DateTimeImmutable && $userStatusTimestamp > $dateTime->getTimestamp()) {
return false;
}
}