From 897643a9798234aab8e55d50593a20291c477176 Mon Sep 17 00:00:00 2001 From: Byron Jones Date: Wed, 20 Aug 2014 14:54:47 +0800 Subject: Bug 1055945: splinter generates "Use of uninitialized value" warnings when dealing with public reviews on private attachments --- extensions/Splinter/Extension.pm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'extensions/Splinter') diff --git a/extensions/Splinter/Extension.pm b/extensions/Splinter/Extension.pm index c383297c4..a3d9fe181 100644 --- a/extensions/Splinter/Extension.pm +++ b/extensions/Splinter/Extension.pm @@ -116,11 +116,12 @@ sub bug_format_comment { # there is only one match in the text we are linkifying, since they all # get the same link. my $REVIEW_RE = qr/Review\s+of\s+attachment\s+(\d+)\s*:/; - + if ($$text =~ $REVIEW_RE) { - my $review_link = get_review_link($bug, $1, "Review"); - my $attach_link = Bugzilla::Template::get_attachment_link($1, "attachment $1"); - + my $attach_id = $1; + my $review_link = get_review_link($attach_id, "Review"); + my $attach_link = Bugzilla::Template::get_attachment_link($attach_id, "attachment $attach_id"); + push(@$regexes, { match => $REVIEW_RE, replace => "$review_link of $attach_link:"}); } -- cgit v1.2.3-24-g4f1b