diff --git wp-includes/post.php wp-includes/post.php
index 56c2ea5..3260dc8 100644
--- wp-includes/post.php
+++ wp-includes/post.php
@@ -3579,7 +3579,7 @@ function wp_update_post( $postarr = array(), $wp_error = false ) {
 	}
 
 	if ($postarr['post_type'] == 'attachment')
-		return wp_insert_attachment($postarr);
+		return wp_insert_attachment( $postarr, false, 0, $wp_error );
 
 	return wp_insert_post( $postarr, $wp_error );
 }
