summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2020-03-30 10:56:48 +0200
committerAndrey Andreev <narf@devilix.net>2020-03-30 10:57:59 +0200
commitd325ca378c47bd0aa9bd1cda6909a0419dd2dc30 (patch)
tree795b99d54af1b8f0acbf8b092c0bc794bef4a99d
parentc1b604e82378dcd1e981157638d947db9e3d096b (diff)
[ci skip] Merge pull request #5895 from joshkel/pdo-db-close
Fix database connection leak when closing PDO connection
-rw-r--r--system/database/drivers/pdo/pdo_driver.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/system/database/drivers/pdo/pdo_driver.php b/system/database/drivers/pdo/pdo_driver.php
index 614d35096..b23e8cbda 100644
--- a/system/database/drivers/pdo/pdo_driver.php
+++ b/system/database/drivers/pdo/pdo_driver.php
@@ -326,4 +326,17 @@ class CI_DB_pdo_driver extends CI_DB {
return 'TRUNCATE TABLE '.$table;
}
+ // --------------------------------------------------------------------
+
+ /**
+ * Close DB Connection
+ *
+ * @return void
+ */
+ protected function _close()
+ {
+ $this->result_id = FALSE;
+ $this->conn_id = FALSE;
+ }
+
}