For some reason the value of $component['DTSTART'][0] may not be a DateTimeImmutable
Closes #42464
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
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;
}
}