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

git-svn-id: http://svn.automattic.com/wordpress/trunk@6407 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
westi 2007-12-19 17:34:15 +00:00
parent e0de7b04a6
commit d7d770ef7c
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);
}