From 269f86348f49c754212ea1fe2d80f7d9d3ebcace Mon Sep 17 00:00:00 2001 From: Cato Auestad Date: Wed, 23 May 2018 12:51:33 +0200 Subject: [PATCH 1/3] 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 0be34106..de7538ae 100644 --- a/idiorm.php +++ b/idiorm.php @@ -361,9 +361,11 @@ public static function set_db($db, $connection_name = self::DEFAULT_CONNECTION) } /** - * 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(); } From 5e09668b95fd20e8f1ecbe25c4667b5c989a9445 Mon Sep 17 00:00:00 2001 From: Simon Holywell Date: Thu, 31 May 2018 09:55:46 +1000 Subject: [PATCH 2/3] Update the changelog --- README.markdown | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.markdown b/README.markdown index a8eadc85..a38904fd 100644 --- a/README.markdown +++ b/README.markdown @@ -85,9 +85,13 @@ is a Docker setup in `./test/docker_for_php52` - check the readme in there for m Changelog --------- +#### 1.5.6 - released 2018-05-31 + +* Assign `null` to `self::$_db` on `reset_db()` to ensure PDO closes the connections #338 [[bleakgadfly](https://github.com/bleakgadfly)] - [issue #338](https://github.com/j4mie/idiorm/issues/338) + #### 1.5.5 - released 2018-01-05 -* Add a docker setup for testing with PHP 5.2 (uses PHPUnit 3.6.12, which is the last version released compatible with PHP 5.2) [Treffynnon](https://github.com/treffynnon) +* Add a docker setup for testing with PHP 5.2 (uses PHPUnit 3.6.12, which is the last version released compatible with PHP 5.2) [[Treffynnon](https://github.com/treffynnon)] #### 1.5.4 - released 2018-01-04 From ed8293a0a88b6c319b678d65cc6699c14b7e4926 Mon Sep 17 00:00:00 2001 From: Simon Holywell Date: Thu, 31 May 2018 09:56:32 +1000 Subject: [PATCH 3/3] Update the changelog --- README.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.markdown b/README.markdown index a38904fd..488c55d1 100644 --- a/README.markdown +++ b/README.markdown @@ -87,7 +87,7 @@ Changelog --------- #### 1.5.6 - released 2018-05-31 -* Assign `null` to `self::$_db` on `reset_db()` to ensure PDO closes the connections #338 [[bleakgadfly](https://github.com/bleakgadfly)] - [issue #338](https://github.com/j4mie/idiorm/issues/338) +* Assign `null` to `self::$_db` on `reset_db()` to ensure PDO closes the connections [[bleakgadfly](https://github.com/bleakgadfly)] - [issue #338](https://github.com/j4mie/idiorm/issues/338) #### 1.5.5 - released 2018-01-05