From 90385cd79a550b4ac08e10e3b8a01abc37965bd4 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Wed, 25 Jan 2006 21:01:52 +0000 Subject: - moved add_log out of functions_admin (this file should only be included in admin/admin-related pages) - fixed cookie based topic tracking - added missing config variables - other minor things git-svn-id: file:///svn/phpbb/trunk@5494 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/db/mysql.php | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'phpBB/includes/db/mysql.php') diff --git a/phpBB/includes/db/mysql.php b/phpBB/includes/db/mysql.php index 57aad449d4..36dd73204c 100644 --- a/phpBB/includes/db/mysql.php +++ b/phpBB/includes/db/mysql.php @@ -285,6 +285,14 @@ class dbal_mysql 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) -- cgit v1.2.1