Skip to content
Snippets Groups Projects
Commit 03586517 authored by Peter Rotich's avatar Peter Rotich
Browse files

Fix Memcached backed session backed on php 7.x

parent 001274a9
No related branches found
No related tags found
No related merge requests found
......@@ -292,12 +292,13 @@ extends SessionBackend {
if ($data = $this->memcache->get($key))
break;
}
}
// No session data on record -- new session
$this->isnew = $data === false;
return $data;
return $data ?: '';
}
function update($id, $data) {
......@@ -311,6 +312,9 @@ extends SessionBackend {
if (!$this->memcache->replace($key, $data, 0, $this->getTTL()));
$this->memcache->set($key, $data, 0, $this->getTTL());
}
return true;
}
function destroy($id) {
......@@ -321,6 +325,8 @@ extends SessionBackend {
$this->memcache->replace($key, '', 0, 1);
$this->memcache->delete($key, 0);
}
return true;
}
function gc($maxlife) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment