From 59c7077fd93ae6842d37c07bcb9e27d7ddc27050 Mon Sep 17 00:00:00 2001 From: Dan Brown Date: Fri, 9 Jun 2023 19:21:49 +0100 Subject: [PATCH] Fixed error on pages without comments --- app/Activity/Tools/CommentTree.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Activity/Tools/CommentTree.php b/app/Activity/Tools/CommentTree.php index 559edccf3..3303add39 100644 --- a/app/Activity/Tools/CommentTree.php +++ b/app/Activity/Tools/CommentTree.php @@ -65,7 +65,7 @@ class CommentTree } $tree = []; - foreach ($childMap[0] as $childId) { + foreach ($childMap[0] ?? [] as $childId) { $tree[] = $this->createTreeForId($childId, 0, $byId, $childMap); }