aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/report.php
diff options
context:
space:
mode:
authorDhruv <dhruv.goel92@gmail.com>2013-06-11 00:09:14 +0530
committerDhruv <dhruv.goel92@gmail.com>2013-07-01 21:48:56 +0530
commit2c240f8a7b36feab129336b7e36273cdb9798364 (patch)
treedcc6bfd8a5a889fc12cb655db3cf65a3b5ad4733 /phpBB/report.php
parent7c9a1cbca9719eccbee11db418cb4e531f539a0c (diff)
downloadforums-2c240f8a7b36feab129336b7e36273cdb9798364.tar
forums-2c240f8a7b36feab129336b7e36273cdb9798364.tar.gz
forums-2c240f8a7b36feab129336b7e36273cdb9798364.tar.bz2
forums-2c240f8a7b36feab129336b7e36273cdb9798364.tar.xz
forums-2c240f8a7b36feab129336b7e36273cdb9798364.zip
[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
Diffstat (limited to 'phpBB/report.php')
-rw-r--r--phpBB/report.php24
1 files changed, 12 insertions, 12 deletions
diff --git a/phpBB/report.php b/phpBB/report.php
index 7f6cd4a792..1ae0abcdc2 100644
--- a/phpBB/report.php
+++ b/phpBB/report.php
@@ -151,20 +151,20 @@ if ($submit && $reason_id)
$error[] = $vc_response;
}
- 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'))
{
- $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');
- }
+ $error[] = $user->lang('EMPTY_REPORT');
+ }
+ if (!sizeof($error))
+ {
$sql_ary = array(
'reason_id' => (int) $reason_id,
'post_id' => $post_id,