[ticket/17188] Allow request variable to check multiline unicode

Change set_var to check for multiline strings if multibyte

PHPBB3-17188
This commit is contained in:
toxyy 2023-09-12 00:34:54 -04:00 committed by Ruben Calvo
parent bdbbc63b9c
commit 8360752b2a
No known key found for this signature in database

View file

@ -55,7 +55,7 @@ class type_cast_helper implements \phpbb\request\type_cast_helper_interface
// Make sure multibyte characters are wellformed // Make sure multibyte characters are wellformed
if ($multibyte) if ($multibyte)
{ {
if (!preg_match('/^./u', $result)) if (!preg_match('/^./um', $result))
{ {
$result = ''; $result = '';
} }