Page MenuHomePhorge

D25565.1734790298.diff
No OneTemporary

D25565.1734790298.diff

diff --git a/externals/mimemailparser/MimeMailParser.class.php b/externals/mimemailparser/MimeMailParser.class.php
--- a/externals/mimemailparser/MimeMailParser.class.php
+++ b/externals/mimemailparser/MimeMailParser.class.php
@@ -308,6 +308,9 @@
* @param $part Array
*/
private function getPartHeaders($part) {
+ if (!$part['headers']) {
+ throw new Exception('MimeMailParser::getHeaders() could not parse any email headers.');
+ }
if (isset($part['headers'])) {
return $part['headers'];
}
diff --git a/scripts/mail/mail_handler.php b/scripts/mail/mail_handler.php
--- a/scripts/mail/mail_handler.php
+++ b/scripts/mail/mail_handler.php
@@ -55,7 +55,9 @@
}
$headers = $parser->getHeaders();
-$headers['subject'] = phutil_decode_mime_header($headers['subject']);
+if (array_key_exists('subject', $headers)) {
+ $headers['subject'] = phutil_decode_mime_header($headers['subject']);
+}
$headers['from'] = phutil_decode_mime_header($headers['from']);
if ($args->getArg('process-duplicates')) {

File Metadata

Mime Type
text/plain
Expires
Sat, Dec 21, 14:11 (18 h, 42 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1024314
Default Alt Text
D25565.1734790298.diff (1023 B)

Event Timeline