Don't redirect if there are errors.

This commit is contained in:
flash 2018-09-27 08:42:43 +02:00
parent 1d223ae0e5
commit b385909298

View file

@ -392,7 +392,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
}
}
if (!empty($_POST['user']) && !empty($_SERVER['HTTP_REFERER'])) {
if (empty($settingsErrors) && !empty($_POST['user']) && !empty($_SERVER['HTTP_REFERER'])) {
header('Location: /profile.php?u=' . ((int)($_POST['user'] ?? 0)));
return;
}