mirror of
https://github.com/nextcloud/server.git
synced 2026-04-15 22:11:17 -04:00
fix(caldav): only call getTimestamp() on actual DateTime data
For some reason the value of $component['DTSTART'][0] may not be a DateTimeImmutable Closes #42464 Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
63f327c7ba
commit
2bfe67c8ab
1 changed files with 1 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue