From: lpsolit%gmail.com <> Date: Sat, 6 Jan 2007 22:14:59 +0000 (+0000) Subject: Bug 362996: email_in.pl throws warnings of uninitialized values when no content-type... X-Git-Tag: bugzilla-2.23.4~83 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f831ad08bc165c3b6ca609c1798bab7285bdbbd7;p=thirdparty%2Fbugzilla.git Bug 362996: email_in.pl throws warnings of uninitialized values when no content-type is given - Patch by Bill Barry r=mkanat a=myk --- diff --git a/email_in.pl b/email_in.pl index f90bdcd8b1..40474afaf6 100644 --- a/email_in.pl +++ b/email_in.pl @@ -269,7 +269,7 @@ sub debug_print { sub get_body_and_attachments { my ($email) = @_; - my $ct = $email->content_type; + my $ct = $email->content_type || 'text/plain'; debug_print("Splitting Body and Attachments [Type: $ct]..."); my $body; @@ -294,7 +294,7 @@ sub get_text_alternative { my @parts = $email->parts; my $body; foreach my $part (@parts) { - my $ct = $part->content_type; + my $ct = $part->content_type || 'text/plain'; debug_print("Part Content-Type: $ct", 2); if (!$ct || $ct =~ /^text\/plain/i) { $body = $part->body;