diff --git a/Security/PhpCode.php b/Security/PhpCode.php index b70039a69..b9883c9ba 100644 --- a/Security/PhpCode.php +++ b/Security/PhpCode.php @@ -79,7 +79,7 @@ class PhpCode */ public static function hasUnicode(string $source) : bool { - return (bool) preg_match('/[^\x20-\x7f]/', $source) || !mb_check_encoding($source, 'ASCII'); + return (bool) preg_match('/[^\x00-\x7f]/', $source); } /** diff --git a/Utils/ArrayUtils.php b/Utils/ArrayUtils.php index cb197ac34..f93fdfa8a 100644 --- a/Utils/ArrayUtils.php +++ b/Utils/ArrayUtils.php @@ -325,7 +325,6 @@ class ArrayUtils */ public static function arrayFlatten(array $array) : array { - // see collection collapse as alternative?! $flat = []; $stack = array_values($array);