Make WordPress Core


Ignore:
Timestamp:
10/18/2007 03:55:15 PM (18 years ago)
Author:
ryan
Message:

Catch WP_Error. Props tellyworth. fixes #5226

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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'];
Note: See TracChangeset for help on using the changeset viewer.