1
0
mirror of https://github.com/danog/tgseclib.git synced 2024-11-26 12:14:40 +01:00

Merge pull request #353 from terrafrost/biginteger-function-exists

BigInteger: "be less overly clever loading Crypt/Random"

* terrafrost/biginteger-function-exists:
  BigInteger: "be less overly clever loading Crypt/Random"
This commit is contained in:
Andreas Fischer 2014-05-30 15:50:36 +02:00
commit eb12b347b7

View File

@ -3066,8 +3066,7 @@ class Math_BigInteger
*/
function _random_number_helper($size)
{
$crypt_random = function_exists('crypt_random_string') || (!class_exists('Crypt_Random') && function_exists('crypt_random_string'));
if ($crypt_random) {
if (function_exists('crypt_random_string')) {
$random = crypt_random_string($size);
} else {
$random = '';