Merge pull request #35814 from nextcloud/fix/fix-parameter-type-setreadmarker

Fix parameter type for EntityCollection::setReadMarker in comments app
pull/35836/head
Côme Chilliet 2022-12-20 11:04:18 +07:00 committed by GitHub
commit e50efc6f66
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 5 deletions

@ -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;