aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions.php
diff options
context:
space:
mode:
authorOleg Pudeyev <oleg@bsdpower.com>2010-04-22 07:25:28 -0400
committerNils Adermann <naderman@naderman.de>2010-05-16 19:23:54 +0200
commit82ce29ac5855f13e803556b14960af3b759dc14b (patch)
tree77522b51c5a36b6faa9d2db1a7f9aa91beea536f /phpBB/includes/functions.php
parentcb3cf71805246bc2ce3b386a5d70e76dbe1dff0e (diff)
downloadforums-82ce29ac5855f13e803556b14960af3b759dc14b.tar
forums-82ce29ac5855f13e803556b14960af3b759dc14b.tar.gz
forums-82ce29ac5855f13e803556b14960af3b759dc14b.tar.bz2
forums-82ce29ac5855f13e803556b14960af3b759dc14b.tar.xz
forums-82ce29ac5855f13e803556b14960af3b759dc14b.zip
[ticket/7782] Send 404 HTTP code when a nonexistent user/forum/topic is requested.
PHPBB3-7782
Diffstat (limited to 'phpBB/includes/functions.php')
-rw-r--r--phpBB/includes/functions.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 4f52c7c2ce..3886640b41 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -3628,6 +3628,11 @@ function msg_handler($errno, $msg_text, $errfile, $errline)
$user->setup();
}
+ if ($msg_text == 'NO_FORUM' || $msg_text == 'NO_TOPIC' || $msg_text == 'NO_USER')
+ {
+ header("HTTP/1.x 404 Not Found");
+ }
+
$msg_text = (!empty($user->lang[$msg_text])) ? $user->lang[$msg_text] : $msg_text;
$msg_title = (!isset($msg_title)) ? $user->lang['INFORMATION'] : ((!empty($user->lang[$msg_title])) ? $user->lang[$msg_title] : $msg_title);