mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 22:28:51 +00: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:
parent
7c9a1cbca9
commit
2c240f8a7b
1 changed files with 12 additions and 12 deletions
|
@ -151,8 +151,6 @@ if ($submit && $reason_id)
|
||||||
$error[] = $vc_response;
|
$error[] = $vc_response;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!sizeof($error))
|
|
||||||
{
|
|
||||||
$sql = 'SELECT *
|
$sql = 'SELECT *
|
||||||
FROM ' . REPORTS_REASONS_TABLE . "
|
FROM ' . REPORTS_REASONS_TABLE . "
|
||||||
WHERE reason_id = $reason_id";
|
WHERE reason_id = $reason_id";
|
||||||
|
@ -162,9 +160,11 @@ if ($submit && $reason_id)
|
||||||
|
|
||||||
if (!$row || (!$report_text && strtolower($row['reason_title']) == 'other'))
|
if (!$row || (!$report_text && strtolower($row['reason_title']) == 'other'))
|
||||||
{
|
{
|
||||||
trigger_error('EMPTY_REPORT');
|
$error[] = $user->lang('EMPTY_REPORT');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!sizeof($error))
|
||||||
|
{
|
||||||
$sql_ary = array(
|
$sql_ary = array(
|
||||||
'reason_id' => (int) $reason_id,
|
'reason_id' => (int) $reason_id,
|
||||||
'post_id' => $post_id,
|
'post_id' => $post_id,
|
||||||
|
|
Loading…
Add table
Reference in a new issue