1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-01-18 22:58:10 +01: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:
Dhruv 2013-06-11 00:09:14 +05:30
parent 7c9a1cbca9
commit 2c240f8a7b

View File

@ -151,20 +151,20 @@ if ($submit && $reason_id)
$error[] = $vc_response;
}
$sql = 'SELECT *
FROM ' . REPORTS_REASONS_TABLE . "
WHERE reason_id = $reason_id";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
if (!$row || (!$report_text && strtolower($row['reason_title']) == 'other'))
{
$error[] = $user->lang('EMPTY_REPORT');
}
if (!sizeof($error))
{
$sql = 'SELECT *
FROM ' . REPORTS_REASONS_TABLE . "
WHERE reason_id = $reason_id";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
if (!$row || (!$report_text && strtolower($row['reason_title']) == 'other'))
{
trigger_error('EMPTY_REPORT');
}
$sql_ary = array(
'reason_id' => (int) $reason_id,
'post_id' => $post_id,