summaryrefslogtreecommitdiffstats
path: root/system/libraries/Encryption.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2017-01-19 14:17:00 +0100
committerAndrey Andreev <narf@devilix.net>2017-01-19 14:17:00 +0100
commitf565212c5aa07a8016394a3bc66874be83c73d4d (patch)
treed96a826347978c3054b565504f901445310b17b3 /system/libraries/Encryption.php
parent2649e6e3f3d2a44fd09a25e6f8f70848a75dbed5 (diff)
Fix byte-safety issues & actually test for them
Diffstat (limited to 'system/libraries/Encryption.php')
-rw-r--r--system/libraries/Encryption.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/system/libraries/Encryption.php b/system/libraries/Encryption.php
index 74832ede6..c1e454dda 100644
--- a/system/libraries/Encryption.php
+++ b/system/libraries/Encryption.php
@@ -135,11 +135,11 @@ class CI_Encryption {
);
/**
- * mbstring.func_override flag
+ * mbstring.func_overload flag
*
* @var bool
*/
- protected static $func_override;
+ protected static $func_overload;
// --------------------------------------------------------------------
@@ -161,7 +161,7 @@ class CI_Encryption {
show_error('Encryption: Unable to find an available encryption driver.');
}
- isset(self::$func_override) OR self::$func_override = (extension_loaded('mbstring') && ini_get('mbstring.func_override'));
+ isset(self::$func_overload) OR self::$func_overload = (extension_loaded('mbstring') && ini_get('mbstring.func_overload'));
$this->initialize($params);
if ( ! isset($this->_key) && self::strlen($key = config_item('encryption_key')) > 0)
@@ -911,7 +911,7 @@ class CI_Encryption {
*/
protected static function strlen($str)
{
- return (self::$func_override)
+ return (self::$func_overload)
? mb_strlen($str, '8bit')
: strlen($str);
}
@@ -928,7 +928,7 @@ class CI_Encryption {
*/
protected static function substr($str, $start, $length = NULL)
{
- if (self::$func_override)
+ if (self::$func_overload)
{
// mb_substr($str, $start, null, '8bit') returns an empty
// string on PHP 5.3