diff options
-rw-r--r-- | Bugzilla/Comment.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Bugzilla/Comment.pm b/Bugzilla/Comment.pm index ff718c9e1..2fe86253b 100644 --- a/Bugzilla/Comment.pm +++ b/Bugzilla/Comment.pm @@ -34,7 +34,7 @@ use Bugzilla::User; use Bugzilla::Util; use List::Util qw(first); -use Scalar::Util qw(blessed weaken); +use Scalar::Util qw(blessed weaken isweak); ############################### #### Initialization #### @@ -242,7 +242,7 @@ sub bug { my $self = shift; require Bugzilla::Bug; my $bug = $self->{bug} ||= new Bugzilla::Bug($self->bug_id); - weaken($self->{bug}); + weaken($self->{bug}) unless isweak($self->{bug}); return $bug; } |