summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
authorShakespeare2000 <w.veldhoven@versatel.nl>2014-11-02 11:28:47 +0100
committerShakespeare2000 <w.veldhoven@versatel.nl>2014-11-02 11:28:47 +0100
commit305186d50e80d643645dd171abc4790fd4b57b61 (patch)
tree31e5042c6ff027ecd985d5220ccd412b57446d68 /system
parentd46c37059f07433a56c90fa785f3067836256300 (diff)
Fix write() for session_regenerate_id(TRUE)
Switching the if statements, because destroy() already removed the lock.
Diffstat (limited to 'system')
-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 9e74605bc..efdec40e5 100644
--- a/system/libraries/Session/drivers/Session_database_driver.php
+++ b/system/libraries/Session/drivers/Session_database_driver.php
@@ -141,12 +141,8 @@ class CI_Session_database_driver extends CI_Session_driver implements SessionHan
public function write($session_id, $session_data)
{
- if ($this->_lock === FALSE)
- {
- return FALSE;
- }
// Was the ID regenerated?
- elseif ($session_id !== $this->_session_id)
+ if ($session_id !== $this->_session_id)
{
if ( ! $this->_release_lock() OR ! $this->_get_lock($session_id))
{
@@ -156,6 +152,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 FALSE;
+ }
if ($this->_row_exists === FALSE)
{