diff --git a/src/wp-includes/post.php b/src/wp-includes/post.php index 94a450f438..5ebf42f89d 100644 --- a/src/wp-includes/post.php +++ b/src/wp-includes/post.php @@ -3806,7 +3806,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 );