From 5a7327a9837e01d2829c2e8b2ba9de76b0ad9a57 Mon Sep 17 00:00:00 2001 From: cjwatson <> Date: Sun, 6 Oct 2002 23:15:49 -0800 Subject: [PATCH] [project @ 2002-10-07 00:15:49 by cjwatson] Don't assume att=0 if msg= is set - we might just be trying to view a boring message, which could potentially have attachments. --- cgi/bugreport.cgi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cgi/bugreport.cgi b/cgi/bugreport.cgi index eeeecef4..77da0e5b 100755 --- a/cgi/bugreport.cgi +++ b/cgi/bugreport.cgi @@ -25,7 +25,7 @@ my %pkgsrc = %{getpkgsrc()}; my $ref = $param{'bug'} || quit("No bug number"); my $msg = $param{'msg'} || ""; -my $att = $param{'att'} || "0"; +my $att = $param{'att'}; my $boring = ($param{'boring'} || 'no') eq 'yes'; my $reverse = ($param{'reverse'} || 'no') eq 'yes'; my $mbox = ($param{'mbox'} || 'no') eq 'yes'; @@ -186,7 +186,7 @@ while(my $line = ) { push @attachments, $_; my $file = $_->head->recommended_filename; $downloadHtml .= "View Attachment: $file\n"; - if ($msg && $att eq $#attachments) { + if ($msg && defined($att) && $att eq $#attachments) { my $head = $_->head; my $type; chomp($type = $head->mime_attr("content-type")); -- 2.39.5