X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FCore%2FSession%2FCacheSessionHandler.php;h=3ebdb99e167a499502940ae2c0f337489458dbac;hb=5881fa7229a25efd382668e6cd4a3af0f8d3198c;hp=463fd33d3eff0d40de528b1446d64a892f9bef7d;hpb=3628b62aebe187f49b5e3019ed74fa6e0dd815db;p=friendica.git diff --git a/src/Core/Session/CacheSessionHandler.php b/src/Core/Session/CacheSessionHandler.php index 463fd33d3e..3ebdb99e16 100644 --- a/src/Core/Session/CacheSessionHandler.php +++ b/src/Core/Session/CacheSessionHandler.php @@ -13,7 +13,7 @@ require_once 'include/text.php'; /** * SessionHandler using Friendica Cache * - * @author Hypolite Petovan + * @author Hypolite Petovan */ class CacheSessionHandler extends BaseObject implements SessionHandlerInterface { @@ -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)