Skip to content

Commit

Permalink
[ci skip] Fix bcit-ci#3919, bcit-ci#4732
Browse files Browse the repository at this point in the history
  • Loading branch information
narfbg committed Jul 28, 2016
1 parent 005ca97 commit 1748567
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
8 changes: 2 additions & 6 deletions system/libraries/Session/drivers/Session_memcached_driver.php
Original file line number Diff line number Diff line change
Expand Up @@ -209,19 +209,15 @@ public function write($session_id, $session_data)
$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;
}

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']))
)
Expand Down
2 changes: 1 addition & 1 deletion user_guide_src/source/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Release Date: Not Released
Bug fixes for 3.1.1
-------------------


- Fixed a bug (#4732) - :doc:`Session Library <libraries/sessions>` triggered errors while writing data for a newly-created sessions with the 'memcached' driver.


Version 3.1.0
Expand Down

0 comments on commit 1748567

Please sign in to comment.