summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
Diffstat (limited to 'system')
-rw-r--r--system/libraries/Email.php2
-rw-r--r--system/libraries/Form_validation.php12
-rw-r--r--system/libraries/Session/Session.php8
3 files changed, 6 insertions, 16 deletions
diff --git a/system/libraries/Email.php b/system/libraries/Email.php
index 45c5c09b9..66b5803dd 100644
--- a/system/libraries/Email.php
+++ b/system/libraries/Email.php
@@ -405,7 +405,7 @@ class CI_Email {
* @param array $config = array()
* @return void
*/
- public function __construct($config = array())
+ public function __construct(array $config = array())
{
$this->charset = config_item('charset');
diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php
index f161b40e7..9d1660258 100644
--- a/system/libraries/Form_validation.php
+++ b/system/libraries/Form_validation.php
@@ -1151,9 +1151,7 @@ class CI_Form_validation {
return FALSE;
}
- return (MB_ENABLED === TRUE)
- ? ($val <= mb_strlen($str))
- : ($val <= strlen($str));
+ return ($val <= mb_strlen($str));
}
// --------------------------------------------------------------------
@@ -1172,9 +1170,7 @@ class CI_Form_validation {
return FALSE;
}
- return (MB_ENABLED === TRUE)
- ? ($val >= mb_strlen($str))
- : ($val >= strlen($str));
+ return ($val >= mb_strlen($str));
}
// --------------------------------------------------------------------
@@ -1193,9 +1189,7 @@ class CI_Form_validation {
return FALSE;
}
- return (MB_ENABLED === TRUE)
- ? (mb_strlen($str) === (int) $val)
- : (strlen($str) === (int) $val);
+ return (mb_strlen($str) === (int) $val);
}
// --------------------------------------------------------------------
diff --git a/system/libraries/Session/Session.php b/system/libraries/Session/Session.php
index f3b819af9..54d31ee1a 100644
--- a/system/libraries/Session/Session.php
+++ b/system/libraries/Session/Session.php
@@ -94,10 +94,7 @@ class CI_Session {
$this->_driver = 'database';
}
- if (($class = $this->_ci_load_classes($this->_driver)) === FALSE)
- {
- return;
- }
+ $class = $this->_ci_load_classes($this->_driver);
// Configuration ...
$this->_configure($params);
@@ -230,8 +227,7 @@ class CI_Session {
if ( ! class_exists('CI_'.$class, FALSE) && ! class_exists($class, FALSE))
{
- log_message('error', "Session: Configured driver '".$driver."' was not found. Aborting.");
- return FALSE;
+ throw new \UnexpectedValueException("Session: Configured driver '".$driver."' was not found. Aborting.");
}
}