summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2022-12-19 11:44:27 +0100
committerblizzz (Rebase PR Action) <blizzz@users.noreply.github.com>2023-02-07 17:55:48 +0000
commit7a2903ae20f6ec33edb55e5c2dbaa235cd15a29d (patch)
tree3a40d20bab264091ac825abaee63ee48dd02bc27
parent7c6a41488d2995f9af4b844dda64b53ba02904c3 (diff)
downloadnextcloud-server-7a2903ae20f6ec33edb55e5c2dbaa235cd15a29d.tar.gz
nextcloud-server-7a2903ae20f6ec33edb55e5c2dbaa235cd15a29d.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 d9b06e1240c..59eda21df36 100644
--- a/apps/dav/lib/Comments/EntityCollection.php
+++ b/apps/dav/lib/Comments/EntityCollection.php
@@ -163,12 +163,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;