summaryrefslogtreecommitdiffstats
path: root/Bugzilla.pm
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2006-09-14 15:57:29 +0200
committermkanat%bugzilla.org <>2006-09-14 15:57:29 +0200
commit761ae5de8e84ffd70489260364db5789ec135b55 (patch)
treea488a2e5b3605444791ba414dde70ee6292e1cab /Bugzilla.pm
parent47ee48a70f9abe53bc5e934f6e83c997b350dc6b (diff)
downloadbugzilla-761ae5de8e84ffd70489260364db5789ec135b55.tar.gz
bugzilla-761ae5de8e84ffd70489260364db5789ec135b55.tar.xz
Bug 352608: Make checksetup more localizable
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> (module owner) a=myk
Diffstat (limited to 'Bugzilla.pm')
-rw-r--r--Bugzilla.pm6
1 files changed, 5 insertions, 1 deletions
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 {