From 34b92c6c058a27fda4572f16af41340e0b46f4df Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 12 Mar 2015 12:42:00 +0200 Subject: Throw an exception on invalid session driver config --- system/libraries/Session/Session.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'system/libraries/Session/Session.php') 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."); } } -- cgit v1.2.3-24-g4f1b