mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-27 21:58:52 +00:00
Merge branch 'develop-ascraeus' into develop
* develop-ascraeus: [ticket/12764] Properly handle errors upon connecting to MySQLi database
This commit is contained in:
commit
b228b0e1f9
1 changed files with 5 additions and 1 deletions
|
@ -61,7 +61,11 @@ class mysqli extends \phpbb\db\driver\mysql_base
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->db_connect_id = mysqli_init();
|
$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 != '')
|
if ($this->db_connect_id && $this->dbname != '')
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue