aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/viewtopic.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php
index fe73614d3f..fb64a1c225 100644
--- a/phpBB/viewtopic.php
+++ b/phpBB/viewtopic.php
@@ -173,6 +173,11 @@ $result = $db->sql_query($sql);
if (!($topic_data = $db->sql_fetchrow($result)))
{
+ // If post_id was submitted, we try at least to display the topic as a last resort...
+ if ($post_id && $forum_id && $topic_id)
+ {
+ redirect("viewtopic.$phpEx$SID&f=$forum_id&t=$topic_id");
+ }
trigger_error('NO_TOPIC');
}