diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/Comments/Manager.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/private/Comments/Manager.php b/lib/private/Comments/Manager.php index 9393cce334d..d96c22aad51 100644 --- a/lib/private/Comments/Manager.php +++ b/lib/private/Comments/Manager.php @@ -407,11 +407,11 @@ class Manager implements ICommentsManager { $query->setMaxResults($limit); } - $lastKnownComment = $this->getLastKnownComment( + $lastKnownComment = $lastKnownCommentId > 0 ? $this->getLastKnownComment( $objectType, $objectId, $lastKnownCommentId - ); + ) : null; if ($lastKnownComment instanceof IComment) { $lastKnownCommentDateTime = $lastKnownComment->getCreationDateTime(); if ($sortDirection === 'desc') { |