From b385909298dbed9be8ae790bea0c30004ce20930 Mon Sep 17 00:00:00 2001 From: flashwave Date: Thu, 27 Sep 2018 08:42:43 +0200 Subject: [PATCH] Don't redirect if there are errors. --- public/settings.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/settings.php b/public/settings.php index d495b04c..d09314f5 100644 --- a/public/settings.php +++ b/public/settings.php @@ -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; }