Merge branch 'develop-ascraeus' into develop

* develop-ascraeus:
  [ticket/12764] Properly handle errors upon connecting to MySQLi database
This commit is contained in:
Joas Schilling 2014-06-27 15:39:24 +02:00
commit b228b0e1f9

View file

@ -61,7 +61,11 @@ class mysqli extends \phpbb\db\driver\mysql_base
}
$this->db_connect_id = mysqli_init();
@mysqli_real_connect($this->db_connect_id, $this->server, $this->user, $sqlpassword, $this->dbname, $port, $socket, MYSQLI_CLIENT_FOUND_ROWS);
if (!@mysqli_real_connect($this->db_connect_id, $this->server, $this->user, $sqlpassword, $this->dbname, $port, $socket, MYSQLI_CLIENT_FOUND_ROWS))
{
$this->db_connect_id = '';
}
if ($this->db_connect_id && $this->dbname != '')
{