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 From 5e09668b95fd20e8f1ecbe25c4667b5c989a9445 Mon Sep 17 00:00:00 2001 From: Simon Holywell Date: Thu, 31 May 2018 09:55:46 +1000 Subject: Update the changelog --- README.markdown | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.markdown b/README.markdown index a8eadc8..a38904f 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 -- cgit v1.2.3 From ed8293a0a88b6c319b678d65cc6699c14b7e4926 Mon Sep 17 00:00:00 2001 From: Simon Holywell Date: Thu, 31 May 2018 09:56:32 +1000 Subject: Update the changelog --- README.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.markdown b/README.markdown index a38904f..488c55d 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 -- cgit v1.2.3