X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/07de6ecdc5c69a34618ea954183e5630baeb0456..refs/pull/4562/head:/app/Activity/Tools/CommentTree.php 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); }