Merge pull request #8987 from MrPetovan/bug/8984-session-destroy
Add support for empty session write
This commit is contained in:
commit
e733055485
|
@ -87,7 +87,7 @@ class Cache implements SessionHandlerInterface
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$session_data) {
|
if (!$session_data) {
|
||||||
return true;
|
return $this->destroy($session_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->cache->set('session:' . $session_id, $session_data, Session::$expire);
|
return $this->cache->set('session:' . $session_id, $session_data, Session::$expire);
|
||||||
|
|
|
@ -94,7 +94,7 @@ class Database implements SessionHandlerInterface
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$session_data) {
|
if (!$session_data) {
|
||||||
return true;
|
return $this->destroy($session_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
$expire = time() + Session::$expire;
|
$expire = time() + Session::$expire;
|
||||||
|
|
|
@ -53,9 +53,4 @@ class Native extends AbstractSession implements ISession
|
||||||
session_start();
|
session_start();
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function clear()
|
|
||||||
{
|
|
||||||
session_destroy();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue