1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-01 04:10:38 +02:00

Don't spam database server with connections

- MOD: Silently ignore failures to e_db_mysql::close(); if it's failing, it's probably already closed
- FIX: Close the PDO or mysqli connection after each e_db_abstractTest test
- MOD: Changed class2.php's $sql variable to be hinted as an e_db instead of e_db_mysql
This commit is contained in:
Nick Liu
2020-01-19 14:33:11 +01:00
parent 1fd0a171a0
commit 8b354adf44
6 changed files with 22 additions and 16 deletions

View File

@@ -1290,8 +1290,7 @@ class e_db_mysql implements e_db
{
$this->provide_mySQLaccess();
e107::getSingleton('e107_traffic')->BumpWho('db Close', 1);
$result = mysqli_close($this->mySQLaccess);
if ($result === false) $this->dbError('dbClose');
@mysqli_close($this->mySQLaccess);
}