mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-23 10:01:55 +02:00
[ticket/10205] Check for function existence in mssql connect method.
PHPBB3-10205
This commit is contained in:
@@ -25,11 +25,19 @@ include_once($phpbb_root_path . 'includes/db/dbal.' . $phpEx);
|
|||||||
*/
|
*/
|
||||||
class dbal_mssql extends dbal
|
class dbal_mssql extends dbal
|
||||||
{
|
{
|
||||||
|
var $connect_error = '';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Connect to server
|
* Connect to server
|
||||||
*/
|
*/
|
||||||
function sql_connect($sqlserver, $sqluser, $sqlpassword, $database, $port = false, $persistency = false, $new_link = false)
|
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->persistency = $persistency;
|
||||||
$this->user = $sqluser;
|
$this->user = $sqluser;
|
||||||
$this->dbname = $database;
|
$this->dbname = $database;
|
||||||
|
Reference in New Issue
Block a user