diff options
author | Oleg Pudeyev <oleg@bsdpower.com> | 2011-03-06 23:07:48 -0500 |
---|---|---|
committer | Oleg Pudeyev <oleg@bsdpower.com> | 2011-03-06 23:13:19 -0500 |
commit | edc1deaa3afcadab82d404e705e162a9f3fa26c5 (patch) | |
tree | 26717ce610a38f7e286d12e4298e506f426d2ff6 /phpBB/includes/db/firebird.php | |
parent | 4d92f9bb2eea82a9af36401649c318623d39307f (diff) | |
download | forums-edc1deaa3afcadab82d404e705e162a9f3fa26c5.tar forums-edc1deaa3afcadab82d404e705e162a9f3fa26c5.tar.gz forums-edc1deaa3afcadab82d404e705e162a9f3fa26c5.tar.bz2 forums-edc1deaa3afcadab82d404e705e162a9f3fa26c5.tar.xz forums-edc1deaa3afcadab82d404e705e162a9f3fa26c5.zip |
[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
Diffstat (limited to 'phpBB/includes/db/firebird.php')
-rw-r--r-- | phpBB/includes/db/firebird.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/phpBB/includes/db/firebird.php b/phpBB/includes/db/firebird.php index d1d88ffe42..660acb35db 100644 --- a/phpBB/includes/db/firebird.php +++ b/phpBB/includes/db/firebird.php @@ -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); } |