1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 14:00:31 +02:00

[ticket/7782] Send 404 HTTP code when a nonexistent user/forum/topic is requested.

PHPBB3-7782
This commit is contained in:
Oleg Pudeyev
2010-04-22 07:25:28 -04:00
committed by Nils Adermann
parent cb3cf71805
commit 82ce29ac58

View File

@@ -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);