1
0
mirror of https://github.com/danog/phpseclib.git synced 2025-01-22 04:51:19 +01:00

Random: wrap crypt_random_string in a function_exists call

This commit is contained in:
terrafrost 2014-05-26 18:32:36 -05:00
parent 30de331eb4
commit 015d628183

View File

@ -40,6 +40,10 @@
* @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
*
@ -244,3 +248,4 @@ function crypt_random_string($length)
}
return substr($result, 0, $length);
}
}