diff options
-rw-r--r-- | Bugzilla/Component.pm | 7 | ||||
-rw-r--r-- | Bugzilla/Milestone.pm | 2 | ||||
-rw-r--r-- | Bugzilla/Version.pm | 2 |
3 files changed, 5 insertions, 6 deletions
diff --git a/Bugzilla/Component.pm b/Bugzilla/Component.pm index 0fe6fb25a..74c3ae99a 100644 --- a/Bugzilla/Component.pm +++ b/Bugzilla/Component.pm @@ -405,10 +405,9 @@ sub initial_cc { sub product { my $self = shift; - if (!defined $self->{'product'}) { - require Bugzilla::Product; # We cannot |use| it. - $self->{'product'} = new Bugzilla::Product($self->product_id); - } + + require Bugzilla::Product; + $self->{'product'} ||= Bugzilla::Product->new({ id => $self->product_id, cache => 1 }); return $self->{'product'}; } diff --git a/Bugzilla/Milestone.pm b/Bugzilla/Milestone.pm index d8fcd79a5..78eacb3e9 100644 --- a/Bugzilla/Milestone.pm +++ b/Bugzilla/Milestone.pm @@ -245,7 +245,7 @@ sub product { my $self = shift; require Bugzilla::Product; - $self->{'product'} ||= new Bugzilla::Product($self->product_id); + $self->{'product'} ||= Bugzilla::Product->new({ id => $self->product_id, cache => 1 }); return $self->{'product'}; } diff --git a/Bugzilla/Version.pm b/Bugzilla/Version.pm index 7f53add13..2e0854afe 100644 --- a/Bugzilla/Version.pm +++ b/Bugzilla/Version.pm @@ -162,7 +162,7 @@ sub product { my $self = shift; require Bugzilla::Product; - $self->{'product'} ||= new Bugzilla::Product($self->product_id); + $self->{'product'} ||= Bugzilla::Product->new({ id => $self->product_id, cache => 1 }); return $self->{'product'}; } |