From 88d4496b1d0b8df199a5a3845d81abd6c6458541 Mon Sep 17 00:00:00 2001 From: Herb v/d Dool Date: Tue, 24 Jan 2023 10:41:07 -0500 Subject: [PATCH] merge form errors into existing errors instead --- CRM/Utils/System/Backdrop.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CRM/Utils/System/Backdrop.php b/CRM/Utils/System/Backdrop.php index 89259e825a..9f674eec9e 100644 --- a/CRM/Utils/System/Backdrop.php +++ b/CRM/Utils/System/Backdrop.php @@ -102,10 +102,10 @@ class CRM_Utils_System_Backdrop extends CRM_Utils_System_DrupalBase { * Field label for the 'email'. */ public static function checkUserNameEmailExists(&$params, &$errors, $emailName = 'email') { - $errors = form_get_errors(); - if ($errors) { + if ($backdrop_errors = form_get_errors()) { // unset Backdrop messages to avoid twice display of errors unset($_SESSION['messages']); + $errors = array_merge($errors, $backdrop_errors); } if (!empty($params['name'])) { @@ -428,10 +428,10 @@ AND u.status = 1 * @inheritdoc */ public function verifyPassword($params, &$errors) { - $errors = form_get_errors(); - if ($errors) { + if ($backdrop_errors = form_get_errors()) { // unset Backdrop messages to avoid twice display of errors unset($_SESSION['messages']); + $errors = array_merge($errors, $backdrop_errors); } $password = trim($params['pass']); -- 2.25.1