Skip to content

Commit

Permalink
Merge pull request #35814 from nextcloud/fix/fix-parameter-type-setre…
Browse files Browse the repository at this point in the history
…admarker

Fix parameter type for EntityCollection::setReadMarker in comments app
  • Loading branch information
come-nc authored Dec 20, 2022
2 parents 8aca99c + 1bc51a0 commit e50efc6
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions apps/dav/lib/Comments/EntityCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit e50efc6

Please sign in to comment.