diff options
| author | Oleg Pudeyev <oleg@bsdpower.com> | 2011-03-09 21:50:45 -0500 |
|---|---|---|
| committer | Oleg Pudeyev <oleg@bsdpower.com> | 2012-12-04 04:40:47 -0500 |
| commit | 025a95ea909d449e14cb22564983fb005e3f8c06 (patch) | |
| tree | 947ee8343372097550dc0b622b6ef959be38020d /phpBB/includes/db/mysqli.php | |
| parent | e64c5117b9748208a87df80aff6012f3aae573ad (diff) | |
| download | forums-025a95ea909d449e14cb22564983fb005e3f8c06.tar forums-025a95ea909d449e14cb22564983fb005e3f8c06.tar.gz forums-025a95ea909d449e14cb22564983fb005e3f8c06.tar.bz2 forums-025a95ea909d449e14cb22564983fb005e3f8c06.tar.xz forums-025a95ea909d449e14cb22564983fb005e3f8c06.zip | |
[ticket/10205] Account for potentially missing extensions in dbal.
PHPBB3-10205
Diffstat (limited to 'phpBB/includes/db/mysqli.php')
| -rw-r--r-- | phpBB/includes/db/mysqli.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/phpBB/includes/db/mysqli.php b/phpBB/includes/db/mysqli.php index a311b8cda6..98b659723f 100644 --- a/phpBB/includes/db/mysqli.php +++ b/phpBB/includes/db/mysqli.php @@ -27,12 +27,19 @@ include_once($phpbb_root_path . 'includes/db/dbal.' . $phpEx); class dbal_mysqli extends dbal { var $multi_insert = true; + var $connect_error = ''; /** * Connect to server */ function sql_connect($sqlserver, $sqluser, $sqlpassword, $database, $port = false, $persistency = false , $new_link = false) { + if (!function_exists('mysqli_connect')) + { + $this->connect_error = 'mysqli_connect function does not exist, is mysqli extension installed?'; + return $this->sql_error(''); + } + // Mysqli extension supports persistent connection since PHP 5.3.0 $this->persistency = (version_compare(PHP_VERSION, '5.3.0', '>=')) ? $persistency : false; $this->user = $sqluser; |
