summaryrefslogtreecommitdiffstats
path: root/system/libraries
diff options
context:
space:
mode:
Diffstat (limited to 'system/libraries')
-rw-r--r--system/libraries/Encryption.php10
-rw-r--r--system/libraries/Form_validation.php2
-rw-r--r--system/libraries/User_agent.php2
3 files changed, 7 insertions, 7 deletions
diff --git a/system/libraries/Encryption.php b/system/libraries/Encryption.php
index db6b30d46..933f6f232 100644
--- a/system/libraries/Encryption.php
+++ b/system/libraries/Encryption.php
@@ -476,7 +476,7 @@ class CI_Encryption {
$iv = ($iv_size = openssl_cipher_iv_length($params['handle']))
? $this->create_key($iv_size)
- : NULL;
+ : '';
$data = openssl_encrypt(
$data,
@@ -585,7 +585,7 @@ class CI_Encryption {
}
else
{
- $iv = NULL;
+ $iv = '';
}
if (mcrypt_generic_init($params['handle'], $params['key'], $iv) < 0)
@@ -632,7 +632,7 @@ class CI_Encryption {
}
else
{
- $iv = NULL;
+ $iv = '';
}
return empty($params['handle'])
@@ -910,8 +910,8 @@ class CI_Encryption {
protected static function strlen($str)
{
return (self::$func_overload)
- ? mb_strlen($str, '8bit')
- : strlen($str);
+ ? mb_strlen((string) $str, '8bit')
+ : strlen((string) $str);
}
// --------------------------------------------------------------------
diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php
index 9d976984e..1b7bbb96c 100644
--- a/system/libraries/Form_validation.php
+++ b/system/libraries/Form_validation.php
@@ -1056,7 +1056,7 @@ class CI_Form_validation {
{
return is_array($str)
? (empty($str) === FALSE)
- : (trim($str) !== '');
+ : (trim((string) $str) !== '');
}
// --------------------------------------------------------------------
diff --git a/system/libraries/User_agent.php b/system/libraries/User_agent.php
index a42975b35..c144db7a8 100644
--- a/system/libraries/User_agent.php
+++ b/system/libraries/User_agent.php
@@ -498,7 +498,7 @@ class CI_User_agent {
else
{
$referer_host = @parse_url($_SERVER['HTTP_REFERER'], PHP_URL_HOST);
- $own_host = parse_url(config_item('base_url'), PHP_URL_HOST);
+ $own_host = parse_url((string) config_item('base_url'), PHP_URL_HOST);
$this->referer = ($referer_host && $referer_host !== $own_host);
}