Skip to content

PHPMailer uses deprecated preg_replace() syntax for apparently no reason #1788

Closed
@ywarnier

Description

@ywarnier

Current behavior

In class.phpmailer.php::EncodeQ() method, and apparently in other methods as well, the class makes use of a deprecated syntax of preg_replace('/.../e', x, y) where "e" means eval. Then 'x' is a form that apparently needs to be eval'ed. However, 'x' is usually something like this:

"'='.sprintf('%02X', ord('\\1'))"

which, as far as I can see, could very well be translated to something like this:

'='.sprintf('%02X', ord('\\1'))

(and the 'e' could be removed)
The calls deprecation alerts are "hidden" by a @ sign, but... obviously this is not ideal. Maybe just updating the PHPMailer library would do.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions