mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-06 11:32:40 +00:00
Adding destructor in CacheSession handler to avoid a fatal error when closing the session
This commit is contained in:
parent
a14abd6281
commit
c56797a15f
1 changed files with 9 additions and 0 deletions
|
@ -88,4 +88,13 @@ class CacheSession implements CakeSessionHandlerInterface {
|
|||
public function gc($expires = null) {
|
||||
return Cache::gc();
|
||||
}
|
||||
|
||||
/**
|
||||
* Closes the session before the objects handling it become unavailable
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __destruct() {
|
||||
session_write_close();
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue