[ci skip] Fix Memcached replace() result code checks in CI_Session
Related #3919
diff --git a/system/libraries/Session/drivers/Session_memcached_driver.php b/system/libraries/Session/drivers/Session_memcached_driver.php
index ab3b1d9..875e722 100644
--- a/system/libraries/Session/drivers/Session_memcached_driver.php
+++ b/system/libraries/Session/drivers/Session_memcached_driver.php
@@ -211,7 +211,7 @@
{
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 @@
{
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;
}