diff options
author | Andrey Andreev <narf@devilix.net> | 2020-03-30 10:56:48 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-30 10:56:48 +0200 |
commit | dc558c60a9bcc6b0fe3acbf8648ae3db79fc48d4 (patch) | |
tree | 229c81447903e5007dd6d9edbb1c26e8a8af93d6 | |
parent | 46bde01bc2f8bac129fc21646d0a1dfde0b3dd65 (diff) | |
parent | 1be5b1f14920ee599c5c7ee716c973b1b87da0b6 (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.php | 13 |
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; + } + } |