From ea817b4c14de659617a9424dfbe7fb2591ce5349 Mon Sep 17 00:00:00 2001 From: David Lawrence Date: Thu, 7 Apr 2016 20:20:47 +0000 Subject: Bug 1260458 - search failing for users who are not members of the insider group (DBD::mysql::db selectcol_arrayref failed: You have an error in your SQL syntax) --- Bugzilla/Search.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Bugzilla') diff --git a/Bugzilla/Search.pm b/Bugzilla/Search.pm index ff0db1baa..b85e44985 100644 --- a/Bugzilla/Search.pm +++ b/Bugzilla/Search.pm @@ -2654,7 +2654,8 @@ sub _long_desc_nonchanged { # If the user is not part of the insiders group, they cannot see # private comments if (!$self->_user->is_insider) { - $join_args->{term} .= " AND $table.isprivate = 0"; + $join_args->{term} .= ($join_args->{term} ? " AND " : "") + . "$table.isprivate = 0"; } my $join = { -- cgit v1.2.3-24-g4f1b