Fix redirection during install process

This commit is contained in:
Jay 2022-03-02 17:03:56 +01:00
parent 60ef59f1b2
commit 37ef8aa50a

View file

@ -130,12 +130,14 @@ class Page
/**
* Redirect
*/
$url = new URL($_SERVER['QUERY_STRING']);
$redirect_to = $url->getPretty();
if (!isset($_POST['install']) && isset($_SERVER['QUERY_STRING'])) {
$url = new URL($_SERVER['QUERY_STRING']);
$redirect_to = $url->getPretty();
if ($redirect_to && $redirect_to !== $_SERVER['REQUEST_URI']) {
header('Location: ' . $redirect_to);
die();
if ($redirect_to && $redirect_to !== $_SERVER['REQUEST_URI']) {
header('Location: ' . $redirect_to);
die();
}
}
}