summaryrefslogtreecommitdiffstats
path: root/extensions
diff options
context:
space:
mode:
authorByron Jones <glob@mozilla.com>2014-08-20 08:54:47 +0200
committerByron Jones <glob@mozilla.com>2014-08-20 08:54:47 +0200
commit897643a9798234aab8e55d50593a20291c477176 (patch)
tree090e7cd537a840aa114b7d7753baa4cf959a62cf /extensions
parent0d7037f0ae1539f34e447fdbe0fbe0818add88b5 (diff)
downloadbugzilla-897643a9798234aab8e55d50593a20291c477176.tar.gz
bugzilla-897643a9798234aab8e55d50593a20291c477176.tar.xz
Bug 1055945: splinter generates "Use of uninitialized value" warnings when dealing with public reviews on private attachments
Diffstat (limited to 'extensions')
-rw-r--r--extensions/Splinter/Extension.pm9
1 files changed, 5 insertions, 4 deletions
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:"});
}