mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-02-10 22:18:40 +00:00
Fix unicode check
This commit is contained in:
parent
9801d86b61
commit
bcf3b761cd
|
|
@ -79,7 +79,7 @@ class PhpCode
|
||||||
*/
|
*/
|
||||||
public static function hasUnicode(string $source) : bool
|
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -325,7 +325,6 @@ class ArrayUtils
|
||||||
*/
|
*/
|
||||||
public static function arrayFlatten(array $array) : array
|
public static function arrayFlatten(array $array) : array
|
||||||
{
|
{
|
||||||
|
|
||||||
// see collection collapse as alternative?!
|
// see collection collapse as alternative?!
|
||||||
$flat = [];
|
$flat = [];
|
||||||
$stack = array_values($array);
|
$stack = array_values($array);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user