From f831ad08bc165c3b6ca609c1798bab7285bdbbd7 Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Sat, 6 Jan 2007 22:14:59 +0000 Subject: Bug 362996: email_in.pl throws warnings of uninitialized values when no content-type is given - Patch by Bill Barry r=mkanat a=myk --- email_in.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'email_in.pl') diff --git a/email_in.pl b/email_in.pl index f90bdcd8b..40474afaf 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; -- cgit v1.2.3-24-g4f1b