summaryrefslogtreecommitdiffstats
path: root/email_in.pl
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2007-01-06 23:14:59 +0100
committerlpsolit%gmail.com <>2007-01-06 23:14:59 +0100
commitf831ad08bc165c3b6ca609c1798bab7285bdbbd7 (patch)
tree8776e140f6a6fbdf04ee9b7224012ca310a5e850 /email_in.pl
parent4b060796419ff0beb29ea512c76ceb0612680c48 (diff)
downloadbugzilla-f831ad08bc165c3b6ca609c1798bab7285bdbbd7.tar.gz
bugzilla-f831ad08bc165c3b6ca609c1798bab7285bdbbd7.tar.xz
Bug 362996: email_in.pl throws warnings of uninitialized values when no content-type is given - Patch by Bill Barry <after.fallout@gmail.com> r=mkanat a=myk
Diffstat (limited to 'email_in.pl')
-rw-r--r--email_in.pl4
1 files changed, 2 insertions, 2 deletions
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;