mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-12-25 17:30:12 +01:00
gui: add isset test for date header fixing
Signed-off-by: Janos SUTO <sj@acts.hu>
This commit is contained in:
parent
c12a876e59
commit
58e9b809c9
@ -140,7 +140,9 @@ class Piler_Mime_Decode {
|
|||||||
|
|
||||||
// I saw a dumb email (it was a spam, though) having two Date: lines.
|
// 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
|
// 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]; }
|
if(isset($headers[self::HEADER_FIELDS[4]]) && 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++) {
|
for($i=0; $i<count(self::HEADER_FIELDS); $i++) {
|
||||||
if(!isset($headers[self::HEADER_FIELDS[$i]])) { $headers[self::HEADER_FIELDS[$i]] = ''; }
|
if(!isset($headers[self::HEADER_FIELDS[$i]])) { $headers[self::HEADER_FIELDS[$i]] = ''; }
|
||||||
|
Loading…
Reference in New Issue
Block a user