From: Frédéric Buclin Date: Mon, 5 Mar 2012 17:04:28 +0000 (+0100) Subject: Bug 732978: preload() must load Bugzilla::Component itself X-Git-Tag: bugzilla-4.3.1~63 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=272f38031430bbe94d74019d9112ac8ba01d9d42;p=thirdparty%2Fbugzilla.git Bug 732978: preload() must load Bugzilla::Component itself r=dkl a=LpSolit --- diff --git a/Bugzilla/Product.pm b/Bugzilla/Product.pm index bc5c6d9260..fdebc6b007 100644 --- a/Bugzilla/Product.pm +++ b/Bugzilla/Product.pm @@ -109,7 +109,8 @@ sub preload { my @prod_ids = keys %prods; return unless @prod_ids; - my $dbh = Bugzilla->dbh; + # We cannot |use| it due to a dependency loop with Bugzilla::User. + require Bugzilla::Component; foreach my $field (qw(component version milestone)) { my $classname = "Bugzilla::" . ucfirst($field); my $objects = $classname->match({ product_id => \@prod_ids });