Skip to content

Commit

Permalink
Merge pull request #43282 from nextcloud/backport/42696/stable28
Browse files Browse the repository at this point in the history
[stable28] fix(caldav): only call getTimestamp() on actual DateTime data
  • Loading branch information
susnux authored Feb 3, 2024
2 parents 8bf8074 + 020c296 commit d029575
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions apps/dav/lib/CalDAV/Status/StatusService.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,7 @@ public function processCalendarStatus(string $userId): void {
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;
}
}
Expand Down

0 comments on commit d029575

Please sign in to comment.