From 0fcac2a3d31ab68005cc385c5d02540727b2db97 Mon Sep 17 00:00:00 2001 From: Daniel Lashua Date: Tue, 15 Nov 2016 07:46:43 -0600 Subject: [PATCH] Update Connection.php reconnectIfMissingConnection() calls getPdo(). This executes the callback which is not desired for read/write connections where the read is being used. Checking is_null($this->pdo) instead allows for the callback to not be called until it is needed. --- src/Illuminate/Database/Connection.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Illuminate/Database/Connection.php b/src/Illuminate/Database/Connection.php index 3a28da7bb2c9..b975ed7d0ecf 100755 --- a/src/Illuminate/Database/Connection.php +++ b/src/Illuminate/Database/Connection.php @@ -829,7 +829,7 @@ public function reconnect() */ protected function reconnectIfMissingConnection() { - if (is_null($this->getPdo()) || is_null($this->getReadPdo())) { + if (is_null($this->pdo)) { $this->reconnect(); } }