1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

[ticket/9687] Properly display error messages in ACP

PHPBB3-9687
This commit is contained in:
Marc Alexander
2023-07-29 23:10:51 +02:00
parent 1a4e6fe3e8
commit 872439b8f4
6 changed files with 38 additions and 26 deletions

View File

@@ -103,7 +103,14 @@ class acp_ban
$ban_end = $ban_manager->get_ban_end($ban_start, $ban_length, $ban_length_other);
$ban = explode("\n", $ban);
$ban_manager->ban($mode, $ban, $ban_start, $ban_end, $ban_reason, $ban_give_reason);
try
{
$ban_manager->ban($mode, $ban, $ban_start, $ban_end, $ban_reason, $ban_give_reason);
}
catch (\phpbb\exception\exception_interface $exception)
{
trigger_error($language->lang_array($exception->getMessage(), $exception->get_parameters()), E_USER_WARNING);
}
/**
* Use this event to perform actions after the ban has been performed