MDL-66151 core: fix destroy method.

This commit is contained in:
Ilya Tregubov 2024-09-03 11:56:46 +08:00
parent e1e15eb4a7
commit 70ab6b9a28

View file

@ -75,7 +75,7 @@ class database extends handler implements SessionHandlerInterface {
#[\Override]
public function destroy(string $id): bool {
if (!$session = $this->get_session_by_sid($id)) {
if (!$session = $this->database->get_record('sessions', ['sid' => $id], 'id, sid')) {
if ($id == session_id()) {
$this->recordid = null;
$this->lasthash = null;