summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Holywell <[email protected]>2018-05-31 09:51:23 +1000
committerGitHub <[email protected]>2018-05-31 09:51:23 +1000
commit6bba7f658fb424568e7e7711344d829ceb89898e (patch)
tree714a7cd7eda4c31a0769bf07afe56bdcb4ba883f
parentd006418da9bb1fb32313e8de7bf35f9e2696c257 (diff)
parent269f86348f49c754212ea1fe2d80f7d9d3ebcace (diff)
Merge pull request #338 from bleakgadfly/master
Assign null to self::$_db on reset_db to ensure PDO closes the connections
-rw-r--r--idiorm.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/idiorm.php b/idiorm.php
index 0be3410..de7538a 100644
--- a/idiorm.php
+++ b/idiorm.php
@@ -361,9 +361,11 @@
}
/**
- * Delete all registered PDO objects in _db array.
+ * Close and delete all registered PDO objects in _db array.
*/
public static function reset_db() {
+ self::$_db = null;
+
self::$_db = array();
}