summaryrefslogtreecommitdiff
path: root/rt
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2012-07-09 22:19:55 -0700
committerIvan Kohler <ivan@freeside.biz>2012-07-09 22:19:55 -0700
commitdbeb313147d5bbe625d060183a49d24c9f4a4787 (patch)
treeafd96b9c337e7063946ad370bf6c2af091554231 /rt
parentdc8da661243bf26a0a3c2471651e581d2d846a74 (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.pm4
1 files changed, 2 insertions, 2 deletions
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;
}
}