Merge pull request #35837 from nextcloud/backport/35814/stable24

[stable24] Fix parameter type for EntityCollection::setReadMarker in comments app
This commit is contained in:
blizzz 2023-02-09 12:28:13 +01:00 committed by GitHub
commit 2dbf69409b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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