Skip to content

Commit 682ed39

Browse files
committed
Added destructor to mysql server class.
1 parent 99efe96 commit 682ed39

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

server/lib/classes/db_mysql.inc.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,7 @@ class db
4545
var $show_error_messages = true;
4646

4747
// constructor
48-
function db()
49-
{
48+
public function __construct() {
5049

5150
global $conf;
5251
$this->dbHost = $conf['db_host'];
@@ -56,6 +55,10 @@ function db()
5655
$this->dbCharset = $conf['db_charset'];
5756
//$this->connect();
5857
}
58+
59+
public function __destruct() {
60+
$this->closeConn();
61+
}
5962

6063
// error handler
6164
function updateError($location)

0 commit comments

Comments
 (0)