summaryrefslogtreecommitdiffstats
path: root/system/libraries
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2016-07-28 14:16:38 +0200
committerAndrey Andreev <narf@devilix.net>2016-07-28 14:16:38 +0200
commit1748567f5442409d6a8c1e795f56599caff8296e (patch)
tree7587a19c9e4ae4a714ea1a620b0ced12cb05b3f2 /system/libraries
parent005ca972ba5056111354d3af6203cc7af047fb39 (diff)
[ci skip] Fix #3919, #4732
Diffstat (limited to 'system/libraries')
-rw-r--r--system/libraries/Session/drivers/Session_memcached_driver.php8
1 files changed, 2 insertions, 6 deletions
diff --git a/system/libraries/Session/drivers/Session_memcached_driver.php b/system/libraries/Session/drivers/Session_memcached_driver.php
index 88eb4b3a6..99b4d1baa 100644
--- a/system/libraries/Session/drivers/Session_memcached_driver.php
+++ b/system/libraries/Session/drivers/Session_memcached_driver.php
@@ -209,10 +209,7 @@ class CI_Session_memcached_driver extends CI_Session_driver implements SessionHa
$this->_memcached->replace($this->_lock_key, time(), 300);
if ($this->_fingerprint !== ($fingerprint = md5($session_data)))
{
- if (
- $this->_memcached->replace($key, $session_data, $this->_config['expiration'])
- OR ($this->_memcached->getResultCode() === Memcached::RES_NOTFOUND && $this->_memcached->set($key, $session_data, $this->_config['expiration']))
- )
+ if ($this->_memcached->set($key, $session_data, $this->_config['expiration']))
{
$this->_fingerprint = $fingerprint;
return $this->_success;
@@ -220,8 +217,7 @@ class CI_Session_memcached_driver extends CI_Session_driver implements SessionHa
return $this->_fail();
}
-
- if (
+ elseif (
$this->_memcached->touch($key, $this->_config['expiration'])
OR ($this->_memcached->getResultCode() === Memcached::RES_NOTFOUND && $this->_memcached->set($key, $session_data, $this->_config['expiration']))
)