Framework Update
This commit is contained in:
Vendored
+4
-2
@@ -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));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user