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)
149149 private static function getHeadersRelevantForMailerDetection (array $ headers )
150150 {
151151 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 ' ] : '' ,
157157 ]);
158158 }
159159
Original file line number Diff line number Diff line change @@ -400,7 +400,7 @@ static function toPlainText($html) {
400400 // other table tags
401401 $ plain = (string ) preg_replace ('/<td[^>]*>(.*?)<\/td>/i ' , "\t\\1 \n" , $ plain ); // <td>
402402 $ 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" ;
404404 }, $ plain ); // <th>
405405
406406 // list elements
You can’t perform that action at this time.
0 commit comments