Skip to content
Browse files

BUGFIX Revert remove of function_exists() check for mcrypt in

7d84aff, as we don't expect mcrypt to actually be available,
since fallbacks in RandomGenerator are available.
  • Loading branch information...
1 parent 97e44c0 commit 926daa29e23a8571e72427fcdb54626867858ee7 @halkyon halkyon committed
Showing with 4 additions and 2 deletions.
  1. +4 −2 security/RandomGenerator.php
View
6 security/RandomGenerator.php
@@ -21,8 +21,10 @@ function generateEntropy() {
// 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

0 comments on commit 926daa2

Please sign in to comment.
Something went wrong with that request. Please try again.