BUGFIX Revert remove of function_exists() check for mcrypt in

7d84aff01e, as we don't expect mcrypt to actually be available,
since fallbacks in RandomGenerator are available.
This commit is contained in:
Sean Harvey 2012-04-18 18:44:33 +12:00
parent 97e44c0915
commit 926daa29e2

View File

@ -21,8 +21,10 @@ class RandomGenerator {
// TODO Fails with "Could not gather sufficient random data" on IIS, temporarily disabled on windows
if(!$isWin) {
$e = mcrypt_create_iv(64, MCRYPT_DEV_URANDOM);
if($e !== false) return $e;
if(function_exists('mcrypt_create_iv')) {
$e = mcrypt_create_iv(64, MCRYPT_DEV_URANDOM);
if($e !== false) return $e;
}
}
// Fall back to SSL methods - may slow down execution by a few ms