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.
There is a possible issue introduced by 9575c6a.
By using
empty()we are essentially making the function returnfalseif value of$chris'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
falseright there instead of setting$ordto0.Also, the check should probably be moved to the very top of the
_rfc822IsAtext()method.