aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2014-06-27 15:39:07 +0200
committerJoas Schilling <nickvergessen@gmx.de>2014-06-27 15:39:07 +0200
commit919e1a6bc87ff93d974224678c63b7ddef4a708b (patch)
tree50c306c8a9fc92ecb2e3f31f1d10dc9272873a81 /phpBB/phpbb
parent8fa4ca49e0797bd04be3e2a9d7733784e5a5ec11 (diff)
parent40a65abc3ae312876842cc3e19220e74fa002667 (diff)
downloadforums-919e1a6bc87ff93d974224678c63b7ddef4a708b.tar
forums-919e1a6bc87ff93d974224678c63b7ddef4a708b.tar.gz
forums-919e1a6bc87ff93d974224678c63b7ddef4a708b.tar.bz2
forums-919e1a6bc87ff93d974224678c63b7ddef4a708b.tar.xz
forums-919e1a6bc87ff93d974224678c63b7ddef4a708b.zip
Merge pull request #2660 from marc1706/ticket/12764
[ticket/12764] Properly handle errors upon connecting to MySQLi database * marc1706/ticket/12764: [ticket/12764] Properly handle errors upon connecting to MySQLi database
Diffstat (limited to 'phpBB/phpbb')
-rw-r--r--phpBB/phpbb/db/driver/mysqli.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/phpBB/phpbb/db/driver/mysqli.php b/phpBB/phpbb/db/driver/mysqli.php
index 8fc306b2cc..2ed08211ad 100644
--- a/phpBB/phpbb/db/driver/mysqli.php
+++ b/phpBB/phpbb/db/driver/mysqli.php
@@ -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 != '')
{