diff --git a/phpBB/phpbb/ucp/controller/reset_password.php b/phpBB/phpbb/ucp/controller/reset_password.php
index fb66ea1b99..d7b96c51c4 100644
--- a/phpBB/phpbb/ucp/controller/reset_password.php
+++ b/phpBB/phpbb/ucp/controller/reset_password.php
@@ -116,7 +116,10 @@ class reset_password
if (!$this->config['allow_password_reset'])
{
- trigger_error($this->language->lang('UCP_PASSWORD_RESET_DISABLED', '', ''));
+ throw new http_exception(Response::HTTP_OK, 'UCP_PASSWORD_RESET_DISABLED', [
+ '',
+ ''
+ ]);
}
}