Skip to content
Permalink
Browse files

Adding destructor in CacheSession handler to avoid a fatal error when…

… closing the session
  • Loading branch information...
lorenzo committed Oct 7, 2011
1 parent a14abd6 commit c56797a15f4b5894cb9823f2d446e7089d62646b
Showing with 9 additions and 0 deletions.
  1. +9 −0 lib/Cake/Model/Datasource/Session/CacheSession.php
@@ -88,4 +88,13 @@ public function destroy($id) {
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();
}
}

0 comments on commit c56797a

Please sign in to comment.
You can’t perform that action at this time.