diff --git a/src/Illuminate/Support/Str.php b/src/Illuminate/Support/Str.php index 24d308da4be8..2c3a7cbcb376 100755 --- a/src/Illuminate/Support/Str.php +++ b/src/Illuminate/Support/Str.php @@ -221,12 +221,12 @@ public static function random($length = 16) { $string = ''; - while (($len = static::length($string)) < $length) { + while (($len = strlen($string)) < $length) { $size = $length - $len; $bytes = static::randomBytes($size); - $string .= static::substr(str_replace(['/', '+', '='], '', base64_encode($bytes)), 0, $size); + $string .= substr(str_replace(['/', '+', '='], '', base64_encode($bytes)), 0, $size); } return $string; @@ -255,7 +255,7 @@ public static function quickRandom($length = 16) { $pool = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; - return static::substr(str_shuffle(str_repeat($pool, $length)), 0, $length); + return substr(str_shuffle(str_repeat($pool, $length)), 0, $length); } /**