From 761ae5de8e84ffd70489260364db5789ec135b55 Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" <> Date: Thu, 14 Sep 2006 13:57:29 +0000 Subject: Bug 352608: Make checksetup more localizable Patch By Max Kanat-Alexander (module owner) a=myk --- Bugzilla.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'Bugzilla.pm') diff --git a/Bugzilla.pm b/Bugzilla.pm index 287e054ae..c4300b0b5 100644 --- a/Bugzilla.pm +++ b/Bugzilla.pm @@ -338,7 +338,11 @@ sub switch_to_main_db { sub get_fields { my $class = shift; my $criteria = shift; - return @{Bugzilla::Field->match($criteria)}; + # This function may be called during installation, and Field::match + # may fail at that time. so we want to return an empty list in that + # case. + my $fields = eval { Bugzilla::Field->match($criteria) } || []; + return @$fields; } sub custom_field_names { -- cgit v1.2.1