diff --git a/src/Illuminate/Database/Connection.php b/src/Illuminate/Database/Connection.php index 8602b142c5b4..20a83aeb4442 100755 --- a/src/Illuminate/Database/Connection.php +++ b/src/Illuminate/Database/Connection.php @@ -927,6 +927,16 @@ public function getPdo() return $this->pdo; } + /** + * Get the raw current PDO connection parameter. + * + * @return \PDO|\Closure|null + */ + public function getRawPdo() + { + return $this->pdo; + } + /** * Get the current PDO connection used for reading. * @@ -949,6 +959,16 @@ public function getReadPdo() return $this->readPdo ?: $this->getPdo(); } + /** + * Get the raw current read PDO connection parameter. + * + * @return \PDO|\Closure|null + */ + public function getRawReadPdo() + { + return $this->readPdo; + } + /** * Set the PDO connection. * diff --git a/src/Illuminate/Database/DatabaseManager.php b/src/Illuminate/Database/DatabaseManager.php index 85c3f448169b..542e511cc0e2 100755 --- a/src/Illuminate/Database/DatabaseManager.php +++ b/src/Illuminate/Database/DatabaseManager.php @@ -256,8 +256,8 @@ protected function refreshPdoConnections($name) $fresh = $this->makeConnection($name); return $this->connections[$name] - ->setPdo($fresh->getPdo()) - ->setReadPdo($fresh->getReadPdo()); + ->setPdo($fresh->getRawPdo()) + ->setReadPdo($fresh->getRawReadPdo()); } /**