Do not disable redirections + document index.php error handling

This commit is contained in:
Thomas Rubini 2023-01-24 11:52:23 +01:00
parent b8814e5220
commit 594e59d80a
No known key found for this signature in database
GPG Key ID: C7D287C8C1CAC373

View File

@ -44,8 +44,13 @@
}
if ($I_err_httpCode !== null) {
http_response_code($I_err_httpCode);
// do not disable redirects
if(http_response_code() !== 302) {
http_response_code($I_err_httpCode);
}
// Make the user see the error in these cases
if($I_err_httpCode === 500 || $I_err_httpCode === 400) {
header_remove("Location");
}