Fixed select_driver(), cookie sess_destroy(), and native cookie name conflict
diff --git a/system/libraries/Session/Session.php b/system/libraries/Session/Session.php
index 97eab80..1f24456 100755
--- a/system/libraries/Session/Session.php
+++ b/system/libraries/Session/Session.php
@@ -141,14 +141,17 @@
$child = str_replace($this->lib_name.'_', '', $driver);
if (isset($this->$child))
{
- // Make driver current and sync userdata
- $this->current = $this->$child;
- $this->userdata =& $this->current->get_userdata();
+ // See if driver is already current
+ if ($this->$child !== $this->current) {
+ // Make driver current and sync userdata
+ $this->current = $this->$child;
+ $this->userdata =& $this->current->get_userdata();
+ }
}
else
{
// Load new driver
- $this->load_driver($driver);
+ $this->load_driver($child);
}
}
}