diff options
Diffstat (limited to 'phpBB/db/mysql.php')
| -rw-r--r-- | phpBB/db/mysql.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/phpBB/db/mysql.php b/phpBB/db/mysql.php index 6ed2118bd8..96a8a6ea8f 100644 --- a/phpBB/db/mysql.php +++ b/phpBB/db/mysql.php @@ -397,6 +397,11 @@ class sql_db function sql_error($sql = '') { + $result = array( + 'message' => @mysql_error(), + 'code' => @mysql_errno() + ); + if ( !$this->return_on_error ) { if ( $this->transaction ) @@ -411,8 +416,6 @@ class sql_db trigger_error($message, E_USER_ERROR); } - $result['message'] = @mysql_error(); - $result['code'] = @mysql_errno(); return $result; } |
