mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-12-24 19:00:11 +01:00
gui: piler_mime_decode fix
Signed-off-by: Janos SUTO <sj@acts.hu>
This commit is contained in:
parent
def0496502
commit
d3e2de3ada
@ -138,6 +138,10 @@ class Piler_Mime_Decode {
|
||||
|
||||
if(!isset($headers['content-type'])) { $headers['content-type'] = 'text/plain'; }
|
||||
|
||||
// I saw a dumb email (it was a spam, though) having two Date: lines.
|
||||
// In this case we take the first date, and discard the rest
|
||||
if(is_array($headers[self::HEADER_FIELDS[4]])) { $headers[self::HEADER_FIELDS[4]] = $headers[self::HEADER_FIELDS[4]][0]; }
|
||||
|
||||
for($i=0; $i<count(self::HEADER_FIELDS); $i++) {
|
||||
if(!isset($headers[self::HEADER_FIELDS[$i]])) { $headers[self::HEADER_FIELDS[$i]] = ''; }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user