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