mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
Catching any possible exception in DatabaseSession destructor, using exceptions in destructors is a bad idea in PHP
This commit is contained in:
parent
eaf6f0e2c1
commit
e25867da79
1 changed files with 3 additions and 1 deletions
|
@ -150,6 +150,8 @@ class DatabaseSession implements CakeSessionHandlerInterface {
|
|||
* @return void
|
||||
*/
|
||||
public function __destruct() {
|
||||
session_write_close();
|
||||
try {
|
||||
session_write_close();
|
||||
} catch (Exception $e) {}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue