mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-27 04:18:55 +00:00
[ticket/10205] Check for function existence in mssql connect method.
PHPBB3-10205
This commit is contained in:
parent
de2fe1a308
commit
dc521692f3
1 changed files with 8 additions and 0 deletions
|
@ -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;
|
||||||
|
|
Loading…
Add table
Reference in a new issue