Skip to content

Commit 2dbf694

Browse files
authored
Merge pull request #35837 from nextcloud/backport/35814/stable24
[stable24] Fix parameter type for EntityCollection::setReadMarker in comments app
2 parents a57a4ff + 7a2903a commit 2dbf694

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

apps/dav/lib/Comments/EntityCollection.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -163,12 +163,9 @@ public function childExists($name) {
163163

164164
/**
165165
* Sets the read marker to the specified date for the logged in user
166-
*
167-
* @param \DateTime $value
168-
* @return bool
169166
*/
170-
public function setReadMarker($value) {
171-
$dateTime = new \DateTime($value);
167+
public function setReadMarker(?string $value): bool {
168+
$dateTime = new \DateTime($value ?? 'now');
172169
$user = $this->userSession->getUser();
173170
$this->commentsManager->setReadMark($this->name, $this->id, $dateTime, $user);
174171
return true;

0 commit comments

Comments
 (0)