From 269f86348f49c754212ea1fe2d80f7d9d3ebcace Mon Sep 17 00:00:00 2001 From: Cato Auestad Date: Wed, 23 May 2018 12:51:33 +0200 Subject: Assign null to self::$_db on reset to ensure PDO closes the connections --- idiorm.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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(); } -- cgit v1.2.3