Adding destructor in CacheSession handler to avoid a fatal error when closing the session

This commit is contained in:
Jose Lorenzo Rodriguez 2011-10-06 23:10:13 -04:30
parent a14abd6281
commit c56797a15f

View file

@ -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();
}
}