mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 05:50:42 +02:00
[ticket/11566] display error instead of trigger_error
When the error report is empty display error in the template instead of trigger_error PHPBB3-11566
This commit is contained in:
@@ -151,8 +151,6 @@ if ($submit && $reason_id)
|
||||
$error[] = $vc_response;
|
||||
}
|
||||
|
||||
if (!sizeof($error))
|
||||
{
|
||||
$sql = 'SELECT *
|
||||
FROM ' . REPORTS_REASONS_TABLE . "
|
||||
WHERE reason_id = $reason_id";
|
||||
@@ -162,9 +160,11 @@ if ($submit && $reason_id)
|
||||
|
||||
if (!$row || (!$report_text && strtolower($row['reason_title']) == 'other'))
|
||||
{
|
||||
trigger_error('EMPTY_REPORT');
|
||||
$error[] = $user->lang('EMPTY_REPORT');
|
||||
}
|
||||
|
||||
if (!sizeof($error))
|
||||
{
|
||||
$sql_ary = array(
|
||||
'reason_id' => (int) $reason_id,
|
||||
'post_id' => $post_id,
|
||||
|
Reference in New Issue
Block a user