1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-01-19 15:17:16 +01:00

Merge pull request #5937 from mrgoldy/ticket/16422

[ticket/16422] Strip BOM characters
This commit is contained in:
Marc Alexander 2020-04-21 21:47:07 +02:00
commit 66990474b9
No known key found for this signature in database
GPG Key ID: 50E0D2423696F995

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)
{