aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/db/mysql.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/db/mysql.php')
-rw-r--r--phpBB/includes/db/mysql.php18
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(