diff --git a/wp-includes/post.php b/wp-includes/post.php index 581c9391a8..14544ced68 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -789,6 +789,9 @@ function wp_set_post_tags( $post_id = 0, $tags = '' ) { $tag_ids[] = $tag_id; } + if ( !is_array( $tag_ids ) ) + return false; + $tag_ids = array_unique( $tag_ids ); // First the old tags