mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-25 20:58:55 +00:00
[ticket/10057] Skip ibase_service_attach if firebird connection failed.
ibase_errmsg works for the most recent call. If the connection fails, any error message is clobbered by ibase_service_attach call. PHPBB3-10057
This commit is contained in:
parent
4d92f9bb2e
commit
edc1deaa3a
1 changed files with 3 additions and 1 deletions
|
@ -70,7 +70,9 @@ class dbal_firebird extends dbal
|
|||
$this->db_connect_id = @ibase_connect($use_database, $this->user, $sqlpassword, false, false, 3);
|
||||
}
|
||||
|
||||
if (function_exists('ibase_service_attach') && $this->server)
|
||||
// Do not call ibase_service_attach if connection failed,
|
||||
// otherwise error message from ibase_(p)connect call will be clobbered.
|
||||
if ($this->db_connect_id && function_exists('ibase_service_attach') && $this->server)
|
||||
{
|
||||
$this->service_handle = @ibase_service_attach($this->server, $this->user, $sqlpassword);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue