From: Ivan Kohler Date: Tue, 10 Jul 2012 05:19:55 +0000 (-0700) Subject: prevent RT::EmailParser::RescueOutlook from throwing a fatal error.. still better... X-Git-Url: http://git.freeside.biz/gitweb/?a=commitdiff_plain;h=dbeb313147d5bbe625d060183a49d24c9f4a4787;p=freeside.git prevent RT::EmailParser::RescueOutlook from throwing a fatal error.. still better to accept the message anyway, even if it can't be rescued from Outlook --- diff --git a/rt/lib/RT/EmailParser.pm b/rt/lib/RT/EmailParser.pm index a0affd962..ef9f4bfc9 100644 --- a/rt/lib/RT/EmailParser.pm +++ b/rt/lib/RT/EmailParser.pm @@ -584,7 +584,7 @@ sub RescueOutlook { my $text_part; if ( $mime->head->get('Content-Type') =~ m{multipart/mixed} ) { my $first = $mime->parts(0); - if ( $first->head->get('Content-Type') =~ m{multipart/alternative} ) + if ( $first && $first->head->get('Content-Type') =~ m{multipart/alternative} ) { my $inner_first = $first->parts(0); if ( $inner_first->head->get('Content-Type') =~ m{text/plain} ) @@ -595,7 +595,7 @@ sub RescueOutlook { } elsif ( $mime->head->get('Content-Type') =~ m{multipart/alternative} ) { my $first = $mime->parts(0); - if ( $first->head->get('Content-Type') =~ m{text/plain} ) { + if ( $first && $first->head->get('Content-Type') =~ m{text/plain} ) { $text_part = $first; } }