Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions error.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@
// Get URI for this request, strip leading slash
// See langchooser.inc for more info on STRIPPED_URI
$URI = substr($_SERVER['STRIPPED_URI'], 1);
$queryString = $_SERVER['QUERY_STRING'] ?? '';
$uriParts = explode('?', $URI, 2);
$URI = $uriParts[0];
$queryString = isset($uriParts[1]) ? html_entity_decode($uriParts[1], ENT_QUOTES, 'UTF-8') : '';
Comment thread
shivammathur marked this conversation as resolved.

// ============================================================================
// Mozilla Search Sidebar plugin resource file handling (need to be mirror
Expand All @@ -38,8 +40,8 @@

// ============================================================================
// BC: handle bugs.php moved completely to bugs.php.net
if (preg_match("!^bugs.php\\?(.+)$!", $URI, $array)) {
mirror_redirect("https://bugs.php.net/?$array[1]");
if ($URI === 'bugs.php' && $queryString !== '') {
mirror_redirect("https://bugs.php.net/?$queryString");
}

// ============================================================================
Expand Down