Open zzwang opened 8 years ago
In PHP7, mcryot_create_iv() is deprecated. Due to https://github.com/bshaffer/oauth2-server-php/pull/368/files, using mcrypt_create_iv as the default method to generate random bytes causes a deprecated warning.
if (function_exists('mcrypt_create_iv')) { $randomData = mcrypt_create_iv(20, MCRYPT_DEV_URANDOM); if ($randomData !== false && strlen($randomData) === 20) { return bin2hex($randomData); } }
Should we just remove that block or just add version_compare like
if (function_exists('mcrypt_create_iv') && version_compare(7, phpversion()) == 1) { $randomData = mcrypt_create_iv(20, MCRYPT_DEV_URANDOM); if ($randomData !== false && strlen($randomData) === 20) { return bin2hex($randomData); } }
Looks like this would be resolved by #773
and it's been released so this issue might be closed ( https://github.com/bshaffer/oauth2-server-php/pull/788 )
In PHP7, mcryot_create_iv() is deprecated. Due to https://github.com/bshaffer/oauth2-server-php/pull/368/files, using mcrypt_create_iv as the default method to generate random bytes causes a deprecated warning.
Should we just remove that block or just add version_compare like