- Affected version
- 2.2.2
PHP:
public static function stringToArray($string, $pattern = '/\s+/', $limit = -1)
{
return (array)preg_split($pattern, trim($string), $limit, PREG_SPLIT_NO_EMPTY);
}
The default pattern lacks the
u
specifier, and trim
is being used instead of utf8_trim
. A number of call sites probably should be updated to have the utf8/unicode specifier.There are probably other call-sites of
preg_split
which probably should be updated as well (either to the same standards or to use stringToArray
as appropriate