mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-10-05 23:27:04 +00:00
Capture last db error. Pass it in WP_Error data when term inserts fail. Fix typo in WP_Ajax_Response
git-svn-id: https://develop.svn.wordpress.org/trunk@7431 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -18,6 +18,7 @@ class wpdb {
|
||||
|
||||
var $show_errors = false;
|
||||
var $suppress_errors = false;
|
||||
var $last_error = '';
|
||||
var $num_queries = 0;
|
||||
var $last_query;
|
||||
var $col_info;
|
||||
@@ -278,7 +279,7 @@ class wpdb {
|
||||
$this->queries[] = array( $query, $this->timer_stop(), $this->get_caller() );
|
||||
|
||||
// If there is an error then take note of it..
|
||||
if ( mysql_error($this->dbh) ) {
|
||||
if ( $this->last_error = mysql_error($this->dbh) ) {
|
||||
$this->print_error();
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user