diff --git a/phpBB/phpbb/ucp/controller/reset_password.php b/phpBB/phpbb/ucp/controller/reset_password.php
index 5c27c4f414..8877a33ba9 100644
--- a/phpBB/phpbb/ucp/controller/reset_password.php
+++ b/phpBB/phpbb/ucp/controller/reset_password.php
@@ -424,12 +424,9 @@ class reset_password
}
}
- if (!empty($errors))
- {
- $this->template->assign_block_vars_array('PASSWORD_RESET_ERRORS', array_map([$this->language, 'lang'], $errors));
- }
-
$this->template->assign_vars([
+ 'S_PASSWORD_RESET_ERRORS' => (bool) !empty($errors),
+ 'PASSWORD_RESET_ERRORS' => implode('
', array_map([$this->language, 'lang'], $errors)),
'S_IS_PASSWORD_RESET' => true,
'U_RESET_PASSWORD_ACTION' => $this->helper->route('phpbb_ucp_reset_password_controller'),
'S_HIDDEN_FIELDS' => build_hidden_fields([
diff --git a/phpBB/styles/prosilver/template/ucp_reset_password.html b/phpBB/styles/prosilver/template/ucp_reset_password.html
index 0a05f69aed..5273d30d0f 100644
--- a/phpBB/styles/prosilver/template/ucp_reset_password.html
+++ b/phpBB/styles/prosilver/template/ucp_reset_password.html
@@ -10,7 +10,7 @@