From 3b334169a89c3aa0ef9b6e173a3f9bc8ad2fe0cb Mon Sep 17 00:00:00 2001
From: Joas Schilling <coding@schilljs.com>
Date: Wed, 24 Jul 2019 10:39:22 +0200
Subject: [PATCH] Get the topmost parent for the parent instead of doing
 endless recursion

Signed-off-by: Joas Schilling <coding@schilljs.com>
---
 lib/private/Comments/Manager.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/private/Comments/Manager.php b/lib/private/Comments/Manager.php
index 309b682767b..5b256c379b6 100644
--- a/lib/private/Comments/Manager.php
+++ b/lib/private/Comments/Manager.php
@@ -159,7 +159,7 @@ class Manager implements ICommentsManager {
 		if ($comment->getParentId() === '0') {
 			return $comment->getId();
 		} else {
-			return $this->determineTopmostParentId($comment->getId());
+			return $this->determineTopmostParentId($comment->getParentId());
 		}
 	}
 
-- 
GitLab