Skip to content

Commit

Permalink
Add a test for mcrypt_get_iv_size existing if we use CodeIgniters bui…
Browse files Browse the repository at this point in the history
…lt-in encryption when using PHP 7+.
  • Loading branch information
mark-unwin committed Jul 8, 2019
1 parent 7a6cc44 commit 009d620
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion code_igniter/system/libraries/Encrypt.php
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ function mcrypt_encode($data, $key)
function mcrypt_decode($data, $key)
{
$data = $this->_remove_cipher_noise($data, $key);
if (function_exists(mcrypt_get_iv_size)) {
if (function_exists('mcrypt_get_iv_size')) {
$init_size = mcrypt_get_iv_size($this->_get_cipher(), $this->_get_mode());
} else {
return FALSE;
Expand Down

0 comments on commit 009d620

Please sign in to comment.