modify
This commit is contained in:
@@ -185,8 +185,8 @@ class Connection extends Component
|
|||||||
*/
|
*/
|
||||||
public function slaveInstance(): PDO
|
public function slaveInstance(): PDO
|
||||||
{
|
{
|
||||||
if ($this->inTransaction() || empty($this->slaveConfig)) {
|
if (empty($this->slaveConfig)) {
|
||||||
return $this->masterInstance();
|
$this->slaveConfig = ['cds' => $this->cds, 'username' => $this->username, 'password' => $this->password];
|
||||||
}
|
}
|
||||||
return $this->connections()->get($this->slaveConfig, false);
|
return $this->connections()->get($this->slaveConfig, false);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user