Framework Update

This commit is contained in:
2024-01-31 22:15:08 +08:00
parent b5ff5e8b5f
commit 20678a6a0c
1459 changed files with 25954 additions and 16153 deletions
+4 -2
View File
@@ -735,7 +735,9 @@ class Str
while (($len = strlen($string)) < $length) {
$size = $length - $len;
$bytes = random_bytes($size);
$bytesSize = (int) ceil($size / 3) * 3;
$bytes = random_bytes($bytesSize);
$string .= substr(str_replace(['/', '+', '='], '', base64_encode($bytes)), 0, $size);
}
@@ -1073,7 +1075,7 @@ class Str
*/
public static function squish($value)
{
return preg_replace('~(\s|\x{3164})+~u', ' ', preg_replace('~^[\s]+|[\s]+$~u', '', $value));
return preg_replace('~(\s|\x{3164})+~u', ' ', preg_replace('~^[\s\x{FEFF}]+|[\s\x{FEFF}]+$~u', '', $value));
}
/**