Fix unicode check

This commit is contained in:
Dennis Eichhorn 2018-04-24 19:25:59 +02:00
parent 9801d86b61
commit bcf3b761cd
2 changed files with 1 additions and 2 deletions

View File

@ -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);
}
/**

View File

@ -325,7 +325,6 @@ class ArrayUtils
*/
public static function arrayFlatten(array $array) : array
{
// see collection collapse as alternative?!
$flat = [];
$stack = array_values($array);