diff options
author | Oleg Pudeyev <oleg@bsdpower.com> | 2012-12-04 04:50:41 -0500 |
---|---|---|
committer | Oleg Pudeyev <oleg@bsdpower.com> | 2012-12-04 04:50:41 -0500 |
commit | 9f549e8249acbd82b68e961a6e0a31de47d9ca32 (patch) | |
tree | 6d99df2095646589f3fc66271d47835a58fe79c4 /phpBB/includes/db/mysql.php | |
parent | 1a7e2211c35218094e30ddc399d4aa6b45fe75f4 (diff) | |
download | forums-9f549e8249acbd82b68e961a6e0a31de47d9ca32.tar forums-9f549e8249acbd82b68e961a6e0a31de47d9ca32.tar.gz forums-9f549e8249acbd82b68e961a6e0a31de47d9ca32.tar.bz2 forums-9f549e8249acbd82b68e961a6e0a31de47d9ca32.tar.xz forums-9f549e8249acbd82b68e961a6e0a31de47d9ca32.zip |
[ticket/10205] Fix remaining db drivers.
PHPBB3-10205
Diffstat (limited to 'phpBB/includes/db/mysql.php')
-rw-r--r-- | phpBB/includes/db/mysql.php | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/phpBB/includes/db/mysql.php b/phpBB/includes/db/mysql.php index ae36fe6425..7314e92087 100644 --- a/phpBB/includes/db/mysql.php +++ b/phpBB/includes/db/mysql.php @@ -439,10 +439,20 @@ class dbal_mysql extends dbal { if (!$this->db_connect_id) { - return array( - 'message' => @mysql_error(), - 'code' => @mysql_errno() - ); + if (function_exists('mysql_error')) + { + return array( + 'message' => @mysql_error(), + 'code' => @mysql_errno() + ); + } + else + { + return array( + 'message' => $this->connect_error, + 'code' => '', + ); + } } return array( |