[ticket/16422] Strip BOM characters

PHPBB3-16422
This commit is contained in:
mrgoldy 2020-04-08 22:19:40 +02:00
parent c990818200
commit 275ef147f6

View file

@ -36,7 +36,7 @@ class type_cast_helper implements \phpbb\request\type_cast_helper_interface
if ($type == 'string')
{
$result = str_replace(array("\r\n", "\r", "\0"), array("\n", "\n", ''), $result);
$result = strtr($result, ["\r\n" => "\n", "\r" => "\n", "\0" => '', "\u{FEFF}" => '']);
if ($trim)
{