From 78998bed5bd0e281be40493c52c777aba11f3923 Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Mon, 3 Dec 2012 16:52:06 -0800 Subject: [PATCH] handle non-existant Message-Id: properly --- cgi/bugreport.cgi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cgi/bugreport.cgi b/cgi/bugreport.cgi index de4ec76..55617ae 100755 --- a/cgi/bugreport.cgi +++ b/cgi/bugreport.cgi @@ -224,11 +224,11 @@ END # we want to include control messages anyway my $record_wanted_anyway = 0; my ($msg_id) = $record->{text} =~ /^Message-Id:\s+<(.+)>/im; - next if exists $seen_message_ids{$msg_id}; - next if $msg_id =~/handler\..+\.ack(?:info|done)?\@/; + next if defined $msg_id and exists $seen_message_ids{$msg_id}; + next if defined $msg_id and $msg_id =~/handler\..+\.ack(?:info|done)?\@/; $record_wanted_anyway = 1 if $record->{text} =~ /^Received: \(at control\)/; next if not $boring and not $record->{type} eq $wanted_type and not $record_wanted_anyway and @records > 1; - $seen_message_ids{$msg_id} = 1; + $seen_message_ids{$msg_id} = 1 if defined $msg_id; my @lines = split( "\n", $record->{text}, -1 ); if ( $lines[ 1 ] =~ m/^From / ) { my $tmp = $lines[ 0 ]; -- 2.39.2