summaryrefslogtreecommitdiffstats
path: root/whine.pl
diff options
context:
space:
mode:
authorFrédéric Buclin <LpSolit@gmail.com>2011-11-26 01:08:58 +0100
committerFrédéric Buclin <LpSolit@gmail.com>2011-11-26 01:08:58 +0100
commitc9aaffd4541554af069e4ac097c39f567b02f55a (patch)
tree13498d0860a3d4616f26d5f56e767f382678c682 /whine.pl
parent92cb17e05cecb4093ee9e189347ba66b8844528a (diff)
downloadbugzilla-c9aaffd4541554af069e4ac097c39f567b02f55a.tar.gz
bugzilla-c9aaffd4541554af069e4ac097c39f567b02f55a.tar.xz
Bug 255606: Do not let buglist.cgi return all bugs by default
r/a=mkanat
Diffstat (limited to 'whine.pl')
-rwxr-xr-xwhine.pl10
1 files changed, 9 insertions, 1 deletions
diff --git a/whine.pl b/whine.pl
index 7b8809c25..5e023d221 100755
--- a/whine.pl
+++ b/whine.pl
@@ -452,7 +452,15 @@ sub run_queries {
'params' => scalar $searchparams->Vars,
'user' => $args->{'recipient'}, # the search runs as the recipient
);
- my $sqlquery = $search->sql;
+ # If a query fails for whatever reason, it shouldn't kill the script.
+ my $sqlquery = eval { $search->sql };
+ if ($@) {
+ say get_text('whine_query_failed', { query_name => $thisquery->{'name'},
+ author => $args->{'author'},
+ reason => $@ });
+ next;
+ }
+
$sth = $dbh->prepare($sqlquery);
$sth->execute;