summaryrefslogtreecommitdiffstats
path: root/system/libraries
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2017-01-11 11:05:32 +0100
committerAndrey Andreev <narf@devilix.net>2017-01-11 11:05:32 +0100
commit37226c036a52ae857b13109774b1cdfc4b1d4db9 (patch)
tree1530b1e1ee251f51a394e3edb649ba17c7700266 /system/libraries
parent1fb6958272b569c9f111f04375b90662726a92b8 (diff)
[ci skip] Fix an error with DB sessions triggered with regenerate + destroy
Diffstat (limited to 'system/libraries')
-rw-r--r--system/libraries/Session/drivers/Session_database_driver.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/system/libraries/Session/drivers/Session_database_driver.php b/system/libraries/Session/drivers/Session_database_driver.php
index 31f5a4663..b519b782f 100644
--- a/system/libraries/Session/drivers/Session_database_driver.php
+++ b/system/libraries/Session/drivers/Session_database_driver.php
@@ -208,12 +208,8 @@ class CI_Session_database_driver extends CI_Session_driver implements SessionHan
// Prevent previous QB calls from messing with our queries
$this->_db->reset_query();
- if ($this->_lock === FALSE)
- {
- return $this->_fail();
- }
// Was the ID regenerated?
- elseif ($session_id !== $this->_session_id)
+ if (isset($this->_session_id) && $session_id !== $this->_session_id)
{
if ( ! $this->_release_lock() OR ! $this->_get_lock($session_id))
{
@@ -223,6 +219,10 @@ class CI_Session_database_driver extends CI_Session_driver implements SessionHan
$this->_row_exists = FALSE;
$this->_session_id = $session_id;
}
+ elseif ($this->_lock === FALSE)
+ {
+ return $this->_fail();
+ }
if ($this->_row_exists === FALSE)
{