summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCato Auestad <[email protected]>2018-05-23 12:51:33 +0200
committerCato Auestad <[email protected]>2018-05-23 12:51:33 +0200
commit269f86348f49c754212ea1fe2d80f7d9d3ebcace (patch)
tree714a7cd7eda4c31a0769bf07afe56bdcb4ba883f
parentd006418da9bb1fb32313e8de7bf35f9e2696c257 (diff)
Assign null to self::$_db on reset 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();
}