aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2022-12-19 11:44:27 +0100
committerCôme Chilliet <come.chilliet@nextcloud.com>2022-12-19 11:44:27 +0100
commit1bc51a059b81692a7e0245b377fe0245141bd3d8 (patch)
tree8da73e7e67d86d9d4d37b68d5af546eb5d23296e
parent26e413b78d52d0b0b7b19a2e1d615f408f9ff77a (diff)
downloadnextcloud-server-1bc51a059b81692a7e0245b377fe0245141bd3d8.tar.gz
nextcloud-server-1bc51a059b81692a7e0245b377fe0245141bd3d8.zip
Fix parameter type for EntityCollection::setReadMarker in comments app
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
-rw-r--r--apps/dav/lib/Comments/EntityCollection.php7
1 files changed, 2 insertions, 5 deletions
diff --git a/apps/dav/lib/Comments/EntityCollection.php b/apps/dav/lib/Comments/EntityCollection.php
index 164c690afd0..2581ff0c367 100644
--- a/apps/dav/lib/Comments/EntityCollection.php
+++ b/apps/dav/lib/Comments/EntityCollection.php
@@ -162,12 +162,9 @@ class EntityCollection extends RootCollection implements IProperties {
/**
* 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;