Skip to content
Snippets Groups Projects
Commit 484f5970 authored by Josef Moravec's avatar Josef Moravec Committed by Robert Lange
Browse files

Fix Redis session handler destroy return value (#1474)

parent b47d6fbc
No related merge requests found
......@@ -121,7 +121,7 @@ class Redis extends AbstractBase
*
* @param string $sess_id The session ID to destroy
*
* @return void
* @return bool
*/
public function destroy($sess_id)
{
......@@ -130,9 +130,10 @@ class Redis extends AbstractBase
// Perform Redis-specific cleanup
if ($this->redisVersion >= 4) {
$this->getConnection()->unlink("vufind_sessions/{$sess_id}");
$return = $this->getConnection()->unlink("vufind_sessions/{$sess_id}");
} else {
$this->getConnection()->del("vufind_sessions/{$sess_id}");
$return = $this->getConnection()->del("vufind_sessions/{$sess_id}");
}
return ($return > 0) ? true : false;
}
}
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment