Don't create empty tags. Fixes #5412 props ionfish

git-svn-id: https://develop.svn.wordpress.org/trunk@6407 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Peter Westwood 2007-12-19 17:34:15 +00:00
parent f9a1eaf440
commit 5c75f4cc75
1 changed files with 1 additions and 1 deletions

View File

@ -1187,7 +1187,7 @@ function wp_set_post_tags( $post_id = 0, $tags = '', $append = false ) {
if ( empty($tags) )
$tags = array();
$tags = (is_array($tags)) ? $tags : explode( ',', $tags );
$tags = (is_array($tags)) ? $tags : explode( ',', trim($tags, " \s\n\t\r\0\x0B,") );
wp_set_object_terms($post_id, $tags, 'post_tag', $append);
}