* Handle undef being passed in Debbugs::Mime::encode_rfc1522
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.
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];
}