Changeset 6271

Show
Ignore:
Timestamp:
10/18/07 15:55:15 (1 year ago)
Author:
ryan
Message:

Catch WP_Error. Props tellyworth. fixes #5226

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-includes/taxonomy.php

    r6267 r6271  
    11201120        if ( !$id = is_term($term, $taxonomy) ) 
    11211121            $id = wp_insert_term($term, $taxonomy); 
     1122        if ( is_wp_error($id) ) 
     1123            return $id; 
    11221124        $term_ids[] = $id['term_id']; 
    11231125        $id = $id['term_taxonomy_id'];