Commit a0a43c0e authored by Guilherme Blanco's avatar Guilherme Blanco

Merge pull request #864 from randomonkey/master

Fix undefined notices within MasterSlaveConnection
parents 9e795469 cfddafc9
......@@ -151,7 +151,7 @@ class MasterSlaveConnection extends Connection
// If we have a connection open, and this is not an explicit connection
// change request, then abort right here, because we are already done.
// This prevents writes to the slave in case of "keepSlave" option enabled.
if ($this->_conn && !$requestedConnectionChange) {
if (isset($this->_conn) && $this->_conn && !$requestedConnectionChange) {
return false;
}
......@@ -162,7 +162,7 @@ class MasterSlaveConnection extends Connection
$forceMasterAsSlave = true;
}
if ($this->connections[$connectionName]) {
if (isset($this->connections[$connectionName]) && $this->connections[$connectionName]) {
$this->_conn = $this->connections[$connectionName];
if ($forceMasterAsSlave && ! $this->keepSlave) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment