From 06fc8350acaccc0b4f38bd24dc2a61cd9e04ec9a Mon Sep 17 00:00:00 2001 From: Vitaliy Filippov Date: Wed, 29 Aug 2018 17:54:08 +0300 Subject: [PATCH] Fix refreshing views with bad saved queries --- Bugzilla/Views.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Bugzilla/Views.pm b/Bugzilla/Views.pm index cec0478d8..2859d7542 100644 --- a/Bugzilla/Views.pm +++ b/Bugzilla/Views.pm @@ -80,11 +80,11 @@ sub refresh_some_views my $storedquery = Bugzilla::Search::Saved->new({ name => $q, user => $userid }) or next; $storedquery = http_decode_query($storedquery->query); # get SQL code - my $search = new Bugzilla::Search( + my $search = eval { new Bugzilla::Search( params => $storedquery, fields => [ 'bug_id', grep { $_ ne 'bug_id' } split(/[ ,]+/, $storedquery->{columnlist} || '') ], user => $userobj, - ) or next; + ) } or next; # Re-create views my $drop = "DROP VIEW IF EXISTS view\$$user\$$query\$"; my $create = "CREATE VIEW view\$$user\$$query\$";