Page MenuHomePhorge

D25565.1734809242.diff
No OneTemporary

D25565.1734809242.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,10 +308,10 @@
* @param $part Array
*/
private function getPartHeaders($part) {
- if (isset($part['headers'])) {
+ if (isset($part['headers']) && $part['headers']) {
return $part['headers'];
}
- return false;
+ throw new Exception('MimeMailParser::getHeaders() could not parse any email 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, 19:27 (16 h, 12 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1021115
Default Alt Text
D25565.1734809242.diff (1 KB)

Event Timeline