diff options
author | Frédéric Buclin <LpSolit@gmail.com> | 2011-11-26 01:13:18 +0100 |
---|---|---|
committer | Frédéric Buclin <LpSolit@gmail.com> | 2011-11-26 01:13:18 +0100 |
commit | 39a3753d0cd38ff1752b00f24627cbaba412848a (patch) | |
tree | 9790638d058d226f04629936b64b32a5b3380829 /whine.pl | |
parent | 80882f085e8918346ddb0ec3250f0d31ddaba5e6 (diff) | |
download | bugzilla-39a3753d0cd38ff1752b00f24627cbaba412848a.tar.gz bugzilla-39a3753d0cd38ff1752b00f24627cbaba412848a.tar.xz |
Bug 255606: Do not let buglist.cgi return all bugs by default
r/a=mkanat
Diffstat (limited to 'whine.pl')
-rwxr-xr-x | whine.pl | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -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 ($@) { + print get_text('whine_query_failed', { query_name => $thisquery->{'name'}, + author => $args->{'author'}, + reason => $@ }) . "\n"; + next; + } + $sth = $dbh->prepare($sqlquery); $sth->execute; |