Skip to content

Possible issue in _rfc822IsAtext() #13

@amulet1

Description

@amulet1

There is a possible issue introduced by 9575c6a.

By using empty() we are essentially making the function return false if value of $chr is '0'.

The right fix would be to check for $chr === '' or maybe $chr === null || $chr === '' to be on a safe size.

Also, it is easier to return false right there instead of setting $ord to 0.

if ($chr === null || $chr === '') return false;
$ord = ord($chr);

Also, the check should probably be moved to the very top of the _rfc822IsAtext() method.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions