Skip to content

Commit

Permalink
Add restriction of usage of generators based on PHP version.
Browse files Browse the repository at this point in the history
  • Loading branch information
sergepavle committed Jan 10, 2019
1 parent 296cd31 commit f8b9099
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Generator/MCryptGenerator.php
Expand Up @@ -55,7 +55,8 @@ public function generate($byteCount)
public static function isSupported()
{
$supported = false;
if (function_exists('mcrypt_create_iv')) {
if (function_exists('mcrypt_create_iv') &&
version_compare(phpversion(), '7.1', '<')) {
$supported = true;
}

Expand Down

0 comments on commit f8b9099

Please sign in to comment.