mirror of
https://github.com/phpseclib/phpseclib.git
synced 2025-02-10 15:48:41 +00:00
Random: wrap crypt_random_string in a function_exists call
This commit is contained in:
parent
30de331eb4
commit
015d628183
@ -40,6 +40,10 @@
|
|||||||
* @link http://phpseclib.sourceforge.net
|
* @link http://phpseclib.sourceforge.net
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// laravel is a PHP framework that utilizes phpseclib. laravel workbenches may, independently,
|
||||||
|
// have phpseclib as a requirement as well. if you're developing such a program you may encounter
|
||||||
|
// a "Cannot redeclare crypt_random_string()" error.
|
||||||
|
if (!function_exists('crypt_random_string')) {
|
||||||
/**
|
/**
|
||||||
* "Is Windows" test
|
* "Is Windows" test
|
||||||
*
|
*
|
||||||
@ -244,3 +248,4 @@ function crypt_random_string($length)
|
|||||||
}
|
}
|
||||||
return substr($result, 0, $length);
|
return substr($result, 0, $length);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user