From 91d59f8e11839f34bf29e9ac1b14e4bb5cfb97ab Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Tue, 12 Feb 2008 12:12:43 -0800 Subject: [PATCH] * Fix synatx error in scripts/process.in * Handle undef being passed in Debbugs::Mime::encode_rfc1522 --- Debbugs/MIME.pm | 2 ++ scripts/process.in | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Debbugs/MIME.pm b/Debbugs/MIME.pm index 59ffda4..183adc7 100644 --- a/Debbugs/MIME.pm +++ b/Debbugs/MIME.pm @@ -243,6 +243,8 @@ MIME::Words::encode_mimeword on distinct words as appropriate. sub encode_rfc1522 ($) { my ($rawstr) = @_; + # handle being passed undef properly + return undef if not defined $rawstr; # We process words in reverse so we can preserve spacing between # encoded words. This regex splits on word|nonword boundaries and # nonword|nonword boundaries. diff --git a/scripts/process.in b/scripts/process.in index c53e108..7c3a6f6 100755 --- a/scripts/process.in +++ b/scripts/process.in @@ -569,7 +569,7 @@ if ($ref<0) { for my $tag (split /[,\s]+/, $pheader{usertags}) { if ($tag =~ /^[a-zA-Z0-9.+\@-]+/) { my %bugs_with_tag; - @bugs_with_tag{@{$user_tags{$tag}||[]]}} = (1) x @{$user_tags{$tag}||[]}; + @bugs_with_tag{@{$user_tags{$tag}||[]}} = (1) x @{$user_tags{$tag}||[]}; $bugs_with_tag{$ref} = 1; $user_tags{$tag} = [keys %bugs_with_tag]; } -- 2.39.2