File: phpbb/request/type_cast_helper.php
Unmodified
Added
Modified
Removed
Line 36 | Line 36 |
---|
if ($type == 'string') {
|
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) {
| if ($trim) {
|
Line 55 | Line 55 |
---|
// Make sure multibyte characters are wellformed if ($multibyte) {
|
// Make sure multibyte characters are wellformed if ($multibyte) {
|
if (!preg_match('/^./u', $result))
| if (!preg_match('//u', $result))
|
{ $result = ''; }
| { $result = ''; }
|
Line 106 | Line 106 |
---|
return; }
|
return; }
|
list($default_key, $default_value) = each($default);
| $default_key = key($default); $default_value = current($default);
|
$key_type = gettype($default_key);
$_var = $var;
| $key_type = gettype($default_key);
$_var = $var;
|