Skip to content

NOW MANAGED ON CODEBERG

Fixed error on pages without comments

Dan Brown59c7077fd93a
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);
}