diff options
Diffstat (limited to 'phpBB/includes/db/mysql4.php')
-rw-r--r-- | phpBB/includes/db/mysql4.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/phpBB/includes/db/mysql4.php b/phpBB/includes/db/mysql4.php index 9db47f37ee..aa8e22c058 100644 --- a/phpBB/includes/db/mysql4.php +++ b/phpBB/includes/db/mysql4.php @@ -288,6 +288,14 @@ class dbal_mysql4 extends dbal */ function _sql_error() { + if (!$this->db_connect_id) + { + return array( + 'message' => @mysql_error(), + 'code' => @mysql_errno() + ); + } + return array( 'message' => @mysql_error($this->db_connect_id), 'code' => @mysql_errno($this->db_connect_id) |