diff options
author | Ivan Kohler <ivan@freeside.biz> | 2012-07-09 22:19:49 -0700 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2012-07-09 22:19:49 -0700 |
commit | acf95956ea282bd4145536d1dc6b4f015af42bf5 (patch) | |
tree | c6f0fc4a523a004d7fa5e11785228681adc02dcb /rt | |
parent | 8ca531ca72ddffcc3561813bdd2f12f07b5911ce (diff) |
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
Diffstat (limited to 'rt')
-rw-r--r-- | rt/lib/RT/EmailParser.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/rt/lib/RT/EmailParser.pm b/rt/lib/RT/EmailParser.pm index 4cf4184a4..059a0967a 100644 --- a/rt/lib/RT/EmailParser.pm +++ b/rt/lib/RT/EmailParser.pm @@ -576,7 +576,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} ) @@ -587,7 +587,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; } } |