aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorThomas Citharel <tcit@tcit.fr>2024-01-11 10:14:48 +0100
committerFerdinand Thiessen <opensource@fthiessen.de>2024-02-03 14:24:09 +0100
commit020c2960b89ae01fe785460ca2f7a3d3b478124e (patch)
treea091db2dc26466ff1384bc48cc4d64519e9c9ca3 /apps
parent7a7f6c84d43d8b911855e4bb402f766da0c6b807 (diff)
downloadnextcloud-server-020c2960b89ae01fe785460ca2f7a3d3b478124e.tar.gz
nextcloud-server-020c2960b89ae01fe785460ca2f7a3d3b478124e.zip
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>
Diffstat (limited to 'apps')
-rw-r--r--apps/dav/lib/CalDAV/Status/StatusService.php3
1 files changed, 1 insertions, 2 deletions
diff --git a/apps/dav/lib/CalDAV/Status/StatusService.php b/apps/dav/lib/CalDAV/Status/StatusService.php
index 24e929f9d0e..9dccd4e77a3 100644
--- a/apps/dav/lib/CalDAV/Status/StatusService.php
+++ b/apps/dav/lib/CalDAV/Status/StatusService.php
@@ -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;
}
}