File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -149,11 +149,11 @@ private static function getHeadersRelevantForMailerDetectionEml(Parser &$parser)
149
149
private static function getHeadersRelevantForMailerDetection (array $ headers )
150
150
{
151
151
return self ::filterHeaders ([
152
- 'x-mailer ' => $ headers ['x-mailer ' ],
153
- 'message-id ' => $ headers ['message_id ' ],
154
- 'received ' => $ headers ['Received ' ],
155
- 'mime-version ' => $ headers ['Mime-Version ' ],
156
- 'user-agent ' => $ headers ['User-Agent ' ],
152
+ 'x-mailer ' => ! empty ( $ headers ['x-mailer ' ]) ? $ headers [ ' x-mailer ' ] : '' ,
153
+ 'message-id ' => ! empty ( $ headers ['message_id ' ]) ? $ headers [ ' message_id ' ] : '' ,
154
+ 'received ' => ! empty ( $ headers ['Received ' ]) ? $ headers [ ' Received ' ] : '' ,
155
+ 'mime-version ' => ! empty ( $ headers ['Mime-Version ' ]) ? $ headers [ ' Mime-Version ' ] : '' ,
156
+ 'user-agent ' => ! empty ( $ headers ['User-Agent ' ]) ? $ headers [ ' User-Agent ' ] : '' ,
157
157
]);
158
158
}
159
159
Original file line number Diff line number Diff line change @@ -400,7 +400,7 @@ static function toPlainText($html) {
400
400
// other table tags
401
401
$ plain = (string ) preg_replace ('/<td[^>]*>(.*?)<\/td>/i ' , "\t\\1 \n" , $ plain ); // <td>
402
402
$ plain = (string ) preg_replace_callback ('/<th[^>]*>(.*?)<\/th>/i ' , function ($ matches ) {
403
- return "\t\t" . mb_strtoupper ($ matches ) . "\n" ;
403
+ return "\t\t" . mb_strtoupper ($ matches[ 0 ] ) . "\n" ;
404
404
}, $ plain ); // <th>
405
405
406
406
// list elements
You can’t perform that action at this time.
0 commit comments