Commit fcc2a3cf authored by Benjamin Eberlei's avatar Benjamin Eberlei

Merge pull request #611 from easybiblabs/fix/DBAL-911

Fix: property access is not allowed yet
parents 6252da0c 88d49704
......@@ -57,7 +57,12 @@ class MysqliConnection implements Connection, PingableConnection, ServerInfoAwar
if ( ! $this->_conn->real_connect($params['host'], $username, $password, $params['dbname'], $port, $socket)) {
set_error_handler($previousHandler);
throw new MysqliException($this->_conn->connect_error, $this->_conn->sqlstate, $this->_conn->connect_errno);
$sqlState = 'HY000';
if (@$this->_conn->sqlstate) {
$sqlState = $this->_conn->sqlstate;
}
throw new MysqliException($this->_conn->connect_error, $sqlState, $this->_conn->connect_errno);
}
set_error_handler($previousHandler);
......
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