summaryrefslogtreecommitdiffstats
path: root/system/libraries/Encrypt.php
diff options
context:
space:
mode:
Diffstat (limited to 'system/libraries/Encrypt.php')
-rw-r--r--system/libraries/Encrypt.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/system/libraries/Encrypt.php b/system/libraries/Encrypt.php
index 102b1dfdd..8ffd93aea 100644
--- a/system/libraries/Encrypt.php
+++ b/system/libraries/Encrypt.php
@@ -104,8 +104,7 @@ class CI_Encrypt {
return $this->encryption_key;
}
- $CI =& get_instance();
- $key = $CI->config->item('encryption_key');
+ $key = config_item('encryption_key');
if ($key === FALSE)
{
@@ -214,6 +213,7 @@ class CI_Encrypt {
$dec = base64_decode($string);
if (($dec = $this->mcrypt_decode($dec, $key)) === FALSE)
{
+ $this->set_mode($current_mode);
return FALSE;
}
@@ -449,7 +449,7 @@ class CI_Encrypt {
*/
protected function _get_cipher()
{
- if ($this->_mcrypt_cipher === '')
+ if ($this->_mcrypt_cipher === NULL)
{
return $this->_mcrypt_cipher = MCRYPT_RIJNDAEL_256;
}
@@ -466,7 +466,7 @@ class CI_Encrypt {
*/
protected function _get_mode()
{
- if ($this->_mcrypt_mode === '')
+ if ($this->_mcrypt_mode === NULL)
{
return $this->_mcrypt_mode = MCRYPT_MODE_CBC;
}