X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/00dbffaf1593b0ac719d98f00839221a9ca52133..refs/tags/wordpress-3.5.2:/wp-includes/wp-db.php diff --git a/wp-includes/wp-db.php b/wp-includes/wp-db.php index b3aa8f6d..4fc829fb 100644 --- a/wp-includes/wp-db.php +++ b/wp-includes/wp-db.php @@ -1120,6 +1120,8 @@ class wpdb { $this->last_result = array(); $this->col_info = null; $this->last_query = null; + $this->rows_affected = $this->num_rows = 0; + $this->last_error = ''; if ( is_resource( $this->result ) ) mysql_free_result( $this->result ); @@ -1300,6 +1302,7 @@ class wpdb { function _insert_replace_helper( $table, $data, $format = null, $type = 'INSERT' ) { if ( ! in_array( strtoupper( $type ), array( 'REPLACE', 'INSERT' ) ) ) return false; + $this->insert_id = 0; $formats = $format = (array) $format; $fields = array_keys( $data ); $formatted_fields = array();