]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 362996: email_in.pl throws warnings of uninitialized values when no content-type...
authorlpsolit%gmail.com <>
Sat, 6 Jan 2007 22:14:59 +0000 (22:14 +0000)
committerlpsolit%gmail.com <>
Sat, 6 Jan 2007 22:14:59 +0000 (22:14 +0000)
email_in.pl

index f90bdcd8b1a822e8dabdc867447c56f17bee95a5..40474afaf6bff7327c1fe185e14646aa72a8506d 100644 (file)
@@ -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;