aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorOleg Pudeyev <oleg@bsdpower.com>2012-12-04 16:14:39 -0500
committerOleg Pudeyev <oleg@bsdpower.com>2012-12-04 16:14:39 -0500
commitdc521692f3c6d65b842a42f68bc727c8a36c9042 (patch)
treea9ffe2e9f813711b482730b9b668f1f41abe1015 /phpBB
parentde2fe1a308b08af868f22d6d9c0b7007f66de676 (diff)
downloadforums-dc521692f3c6d65b842a42f68bc727c8a36c9042.tar
forums-dc521692f3c6d65b842a42f68bc727c8a36c9042.tar.gz
forums-dc521692f3c6d65b842a42f68bc727c8a36c9042.tar.bz2
forums-dc521692f3c6d65b842a42f68bc727c8a36c9042.tar.xz
forums-dc521692f3c6d65b842a42f68bc727c8a36c9042.zip
[ticket/10205] Check for function existence in mssql connect method.
PHPBB3-10205
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/includes/db/mssql.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/phpBB/includes/db/mssql.php b/phpBB/includes/db/mssql.php
index bc0a870885..3792e82aa0 100644
--- a/phpBB/includes/db/mssql.php
+++ b/phpBB/includes/db/mssql.php
@@ -25,11 +25,19 @@ include_once($phpbb_root_path . 'includes/db/dbal.' . $phpEx);
*/
class dbal_mssql extends dbal
{
+ var $connect_error = '';
+
/**
* Connect to server
*/
function sql_connect($sqlserver, $sqluser, $sqlpassword, $database, $port = false, $persistency = false, $new_link = false)
{
+ if (!function_exists('mssql_connect'))
+ {
+ $this->connect_error = 'mssql_connect function does not exist, is mssql extension installed?';
+ return $this->sql_error('');
+ }
+
$this->persistency = $persistency;
$this->user = $sqluser;
$this->dbname = $database;