WordPress.org

Make WordPress Core

Changeset 6407


Ignore:
Timestamp:
12/19/07 17:34:15 (8 years ago)
Author:
westi
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/post.php

    r6382 r6407  
    11881188    if ( empty($tags) ) 
    11891189        $tags = array(); 
    1190     $tags = (is_array($tags)) ? $tags : explode( ',', $tags ); 
     1190    $tags = (is_array($tags)) ? $tags : explode( ',', trim($tags, " \s\n\t\r\0\x0B,") ); 
    11911191    wp_set_object_terms($post_id, $tags, 'post_tag', $append); 
    11921192} 
Note: See TracChangeset for help on using the changeset viewer.