summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--wp-includes/wp-db.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/wp-includes/wp-db.php b/wp-includes/wp-db.php
index 692054229a..4fc829fb6c 100644
--- a/wp-includes/wp-db.php
+++ b/wp-includes/wp-db.php
@@ -1120,7 +1120,7 @@ class wpdb {
$this->last_result = array();
$this->col_info = null;
$this->last_query = null;
- $this->rows_affected = $this->num_rows = $this->insert_id = 0;
+ $this->rows_affected = $this->num_rows = 0;
$this->last_error = '';
if ( is_resource( $this->result ) )
@@ -1302,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();