diff --git a/apps/dav/lib/Comments/EntityCollection.php b/apps/dav/lib/Comments/EntityCollection.php index 164c690afd01e..2581ff0c367af 100644 --- a/apps/dav/lib/Comments/EntityCollection.php +++ b/apps/dav/lib/Comments/EntityCollection.php @@ -162,12 +162,9 @@ public function childExists($name) { /** * Sets the read marker to the specified date for the logged in user - * - * @param \DateTime $value - * @return bool */ - public function setReadMarker($value) { - $dateTime = new \DateTime($value); + public function setReadMarker(?string $value): bool { + $dateTime = new \DateTime($value ?? 'now'); $user = $this->userSession->getUser(); $this->commentsManager->setReadMark($this->name, $this->id, $dateTime, $user); return true;