From 507d26f5268b027e5c9d8dcbdc8319729d9a4ce5 Mon Sep 17 00:00:00 2001 From: habarnam Date: Mon, 24 Mar 2008 20:07:40 +0200 Subject: [PATCH] * slightly changed the mysql improved db driver destructor --- _res/_libs/mysqlim.class.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/_res/_libs/mysqlim.class.php b/_res/_libs/mysqlim.class.php index 64c68ca..b8c9bb5 100644 --- a/_res/_libs/mysqlim.class.php +++ b/_res/_libs/mysqlim.class.php @@ -52,10 +52,9 @@ class mySqlIm extends interfaceSql { } public function __destruct() { - if ($this->conn) +// var_dump($this->link); + if (!empty ($this->link) && is_a ($this->link, 'mysqli')) $this->close(); -// if (!empty($this->link) && is_link($this->link)) -// return mysql_close($this->link); } @@ -80,7 +79,10 @@ class mySqlIm extends interfaceSql { * @return bool */ public function close(){ - return $this->link->close();; + $this->link->close(); + // dunno how smart it is to nullify an mysqli object + $this->link = null; + return true; } /** -- 2.11.4.GIT