[ci skip] A tiny optimization
diff --git a/system/libraries/Session/Session.php b/system/libraries/Session/Session.php
index df6225e..a5c9737 100644
--- a/system/libraries/Session/Session.php
+++ b/system/libraries/Session/Session.php
@@ -125,10 +125,11 @@
if ( ! class_exists('CI_Session_driver', FALSE))
{
- if (file_exists($file_path = APPPATH.'libraries/Session/Session_driver.php') OR file_exists($file_path = BASEPATH.'libraries/Session/Session_driver.php'))
- {
- require_once($file_path);
- }
+ require_once(
+ file_exists(APPPATH.'libraries/Session/Session_driver.php')
+ ? APPPATH.'libraries/Session/Session_driver.php'
+ : BASEPATH.'libraries/Session/Session_driver.php'
+ );
if (file_exists($file_path = APPPATH.'libraries/Session/'.$prefix.'Session_driver.php'))
{
@@ -137,7 +138,6 @@
}
$class = 'Session_'.$driver.'_driver';
-
if ( ! class_exists('CI_'.$class, FALSE))
{
if (file_exists($file_path = APPPATH.'libraries/Session/drivers/'.$class.'.php') OR file_exists($file_path = BASEPATH.'libraries/Session/drivers/'.$class.'.php'))