X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FCore%2FSession%2FCacheSessionHandler.php;h=507735c4fc41a11391c9b70deefb416ab337d653;hb=cfa68c52b9117616fa95a4639ad74e7d220d193d;hp=463fd33d3eff0d40de528b1446d64a892f9bef7d;hpb=a0451e1c6285212ed406b343b97e4a53859a673d;p=friendica.git diff --git a/src/Core/Session/CacheSessionHandler.php b/src/Core/Session/CacheSessionHandler.php index 463fd33d3e..507735c4fc 100644 --- a/src/Core/Session/CacheSessionHandler.php +++ b/src/Core/Session/CacheSessionHandler.php @@ -24,7 +24,7 @@ class CacheSessionHandler extends BaseObject implements SessionHandlerInterface public function read($session_id) { - if (!x($session_id)) { + if (empty($session_id)) { return ''; } @@ -58,9 +58,9 @@ class CacheSessionHandler extends BaseObject implements SessionHandlerInterface return true; } - Cache::set('session:' . $session_id, $session_data, Session::$expire); + $return = Cache::set('session:' . $session_id, $session_data, Session::$expire); - return true; + return $return; } public function close() @@ -70,8 +70,9 @@ class CacheSessionHandler extends BaseObject implements SessionHandlerInterface public function destroy($id) { - Cache::delete('session:' . $id); - return true; + $return = Cache::delete('session:' . $id); + + return $return; } public function gc($maxlifetime)