Skip to content

Commit

Permalink
Merge branch 'ticket/p/7782' into develop-olympus
Browse files Browse the repository at this point in the history
* ticket/p/7782:
  [ticket/7782] Send 404 HTTP code when a nonexistent user/forum/topic is requested.
  • Loading branch information
naderman committed May 16, 2010
2 parents 321f7a9 + 82ce29a commit e36da18
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions phpBB/includes/functions.php
Expand Up @@ -3621,6 +3621,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);

Expand Down

0 comments on commit e36da18

Please sign in to comment.