mirror of
https://github.com/php/web-php.git
synced 2026-03-23 23:02:13 +01:00
Add 404 status handling in manual lookup and results pages (#1783)
This commit is contained in:
@@ -15,6 +15,10 @@ if (!empty($_GET['function']) && is_string($_GET['function'])) {
|
||||
|
||||
if (!empty($_GET['scope']) && is_string($_GET['scope'])) {
|
||||
$scope = htmlspecialchars($_GET['scope'], ENT_QUOTES, 'UTF-8');
|
||||
|
||||
if ($scope == '404quickref') {
|
||||
status_header(404);
|
||||
}
|
||||
} else {
|
||||
$scope = '';
|
||||
}
|
||||
|
||||
@@ -3,6 +3,14 @@
|
||||
$_SERVER['BASE_PAGE'] = 'results.php';
|
||||
include __DIR__ . '/include/prepend.inc';
|
||||
|
||||
if (!empty($_GET['p']) && is_string($_GET['p'])) {
|
||||
$show = htmlspecialchars($_GET['p'], ENT_QUOTES, 'UTF-8');
|
||||
|
||||
if ($show == '404manual') {
|
||||
status_header(404);
|
||||
}
|
||||
}
|
||||
|
||||
// HTTP status line is passed on, signifies an error
|
||||
site_header(
|
||||
'Search results',
|
||||
|
||||
Reference in New Issue
Block a user