mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
[ticket/10057] Check for interbase function existence.
Calling nonexistent functions with @ destroys the script with no feedback as to the cause of the error. Check whether interbase functions exist before calling them. PHPBB3-10057
This commit is contained in:
parent
af43ed655b
commit
4d92f9bb2e
1 changed files with 8 additions and 0 deletions
|
@ -55,10 +55,18 @@ class dbal_firebird extends dbal
|
||||||
|
|
||||||
if ($this->persistency)
|
if ($this->persistency)
|
||||||
{
|
{
|
||||||
|
if (!function_exists('ibase_pconnect'))
|
||||||
|
{
|
||||||
|
return $this->sql_error('ibase_pconnect function does not exist, is interbase extension installed?');
|
||||||
|
}
|
||||||
$this->db_connect_id = @ibase_pconnect($use_database, $this->user, $sqlpassword, false, false, 3);
|
$this->db_connect_id = @ibase_pconnect($use_database, $this->user, $sqlpassword, false, false, 3);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
if (!function_exists('ibase_connect'))
|
||||||
|
{
|
||||||
|
return $this->sql_error('ibase_connect function does not exist, is interbase extension installed?');
|
||||||
|
}
|
||||||
$this->db_connect_id = @ibase_connect($use_database, $this->user, $sqlpassword, false, false, 3);
|
$this->db_connect_id = @ibase_connect($use_database, $this->user, $sqlpassword, false, false, 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue