diff options
author | Andrey Andreev <narf@devilix.net> | 2016-02-11 19:30:43 +0100 |
---|---|---|
committer | Andrey Andreev <narf@devilix.net> | 2016-02-13 15:44:43 +0100 |
commit | 8215e2fcf828964b232e9f48befac4f08fa11187 (patch) | |
tree | b22410620aefe6164f53b9449b3c4c60a2a92b92 /system/libraries | |
parent | 7730dbebab54e6533a30f93c43311039b89c5760 (diff) |
[ci skip] Fix Memcached replace() result code checks in CI_Session
Related #3919
Diffstat (limited to 'system/libraries')
-rw-r--r-- | system/libraries/Session/drivers/Session_memcached_driver.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/system/libraries/Session/drivers/Session_memcached_driver.php b/system/libraries/Session/drivers/Session_memcached_driver.php index ab3b1d97c..875e72255 100644 --- a/system/libraries/Session/drivers/Session_memcached_driver.php +++ b/system/libraries/Session/drivers/Session_memcached_driver.php @@ -211,7 +211,7 @@ class CI_Session_memcached_driver extends CI_Session_driver implements SessionHa { if ( $this->_memcached->replace($key, $session_data, $this->_config['expiration']) - OR ($this->_memcached->getResultCode() === Memcached::RES_NOTSTORED && $this->_memcached->set($key, $session_data, $this->_config['expiration'])) + OR ($this->_memcached->getResultCode() === Memcached::RES_NOTFOUND && $this->_memcached->set($key, $session_data, $this->_config['expiration'])) ) { $this->_fingerprint = $fingerprint; @@ -316,7 +316,7 @@ class CI_Session_memcached_driver extends CI_Session_driver implements SessionHa { if ( ! $this->_memcached->replace($this->_lock_key, time(), 300)) { - return ($this->_memcached->getResultCode() === Memcached::RES_NOTSTORED) + return ($this->_memcached->getResultCode() === Memcached::RES_NOTFOUND) ? $this->_memcached->set($this->_lock_key, time(), 300) : FALSE; } |