Fixed error when trying to access a topic with no posts associated.
This commit is contained in:
parent
0300bae994
commit
0afc5186a7
1 changed files with 5 additions and 1 deletions
|
@ -291,7 +291,11 @@ $postInfos = $forumPosts->getPosts(
|
|||
if(empty($postInfos))
|
||||
Template::throwError(404);
|
||||
|
||||
$originalPostInfo = $forumPosts->getPost(topicInfo: $topicInfo);
|
||||
try {
|
||||
$originalPostInfo = $forumPosts->getPost(topicInfo: $topicInfo);
|
||||
} catch(RuntimeException $ex) {
|
||||
Template::throwError(404);
|
||||
}
|
||||
|
||||
$posts = [];
|
||||
|
||||
|
|
Loading…
Reference in a new issue