]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 732978: preload() must load Bugzilla::Component itself
authorFrédéric Buclin <LpSolit@gmail.com>
Mon, 5 Mar 2012 17:04:28 +0000 (18:04 +0100)
committerFrédéric Buclin <LpSolit@gmail.com>
Mon, 5 Mar 2012 17:04:28 +0000 (18:04 +0100)
r=dkl a=LpSolit

Bugzilla/Product.pm

index bc5c6d9260ee2c37c64e30bd07fe5edbcc5c1980..fdebc6b00740862a945cfe00f5810a888ddc04a3 100644 (file)
@@ -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 });