Catching any possible exception in DatabaseSession destructor, using exceptions in destructors is a bad idea in PHP

This commit is contained in:
Jose Lorenzo Rodriguez 2012-01-12 20:12:38 -04:30
parent eaf6f0e2c1
commit e25867da79

View file

@ -150,6 +150,8 @@ class DatabaseSession implements CakeSessionHandlerInterface {
* @return void
*/
public function __destruct() {
session_write_close();
try {
session_write_close();
} catch (Exception $e) {}
}
}