Merge branch '1.0-travis-exp' into 2.0-travis-exp

This commit is contained in:
terrafrost 2017-12-03 22:40:31 -06:00
commit 2f3c9197d9

View File

@ -45,6 +45,10 @@ class Random
*/
static function string($length)
{
if (!$length) {
return '';
}
if (version_compare(PHP_VERSION, '7.0.0', '>=')) {
try {
return \random_bytes($length);