From ccc83be5fc0002fcc0aeb85a667f2a66a3e2fe3e Mon Sep 17 00:00:00 2001 From: balping Date: Sun, 26 Feb 2017 23:54:59 +0000 Subject: [PATCH 1/2] DatabaseManager::purge with no argument Previously, if no argument was passed, unset($this->connections[null]) was executed, whereas the key for default connection is obviously not null --- src/Illuminate/Database/DatabaseManager.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Illuminate/Database/DatabaseManager.php b/src/Illuminate/Database/DatabaseManager.php index afe852797641..012240f93e04 100755 --- a/src/Illuminate/Database/DatabaseManager.php +++ b/src/Illuminate/Database/DatabaseManager.php @@ -194,6 +194,8 @@ protected function setPdoForType(Connection $connection, $type = null) */ public function purge($name = null) { + $name = $name ?: $this->getDefaultConnection(); + $this->disconnect($name); unset($this->connections[$name]); From 5dc8f35c9859b03ce0e30f6e7648fb4d1d742903 Mon Sep 17 00:00:00 2001 From: balping Date: Mon, 27 Feb 2017 00:04:35 +0000 Subject: [PATCH 2/2] fix StyleCI --- src/Illuminate/Database/DatabaseManager.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Illuminate/Database/DatabaseManager.php b/src/Illuminate/Database/DatabaseManager.php index 012240f93e04..cc9c8dbe6ea9 100755 --- a/src/Illuminate/Database/DatabaseManager.php +++ b/src/Illuminate/Database/DatabaseManager.php @@ -194,7 +194,7 @@ protected function setPdoForType(Connection $connection, $type = null) */ public function purge($name = null) { - $name = $name ?: $this->getDefaultConnection(); + $name = $name ?: $this->getDefaultConnection(); $this->disconnect($name);