diff --git a/wp-includes/post.php b/wp-includes/post.php index 4484caf9c8..d0ec83810b 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -2066,10 +2066,6 @@ function wp_insert_post($postarr = array(), $wp_error = false) { $post_category = array(); } - // Set the default tag list - if ( !isset($tags_input) ) - $tags_input = array(); - if ( empty($post_author) ) $post_author = $user_ID; @@ -2215,7 +2211,7 @@ function wp_insert_post($postarr = array(), $wp_error = false) { wp_set_post_categories( $post_ID, $post_category ); // old-style tags_input - if ( !empty($tags_input) ) + if ( isset( $tags_input ) ) wp_set_post_tags( $post_ID, $tags_input ); // new-style support for all tag-like taxonomies if ( !empty($tax_input) ) {