summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.markdown6
-rw-r--r--idiorm.php4
2 files changed, 8 insertions, 2 deletions
diff --git a/README.markdown b/README.markdown
index a8eadc8..488c55d 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 [[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
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();
}