WordPress.org

Make WordPress Core

Changeset 14077


Ignore:
Timestamp:
04/13/10 14:32:30 (4 years ago)
Author:
ryan
Message:

Sanity check terms. Skip term IDs that don't exist.

File:
1 edited

Legend:

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

    r13946 r14077  
    16351635            continue; 
    16361636 
    1637         if ( !$term_info = is_term($term, $taxonomy) ) 
     1637        if ( !$term_info = is_term($term, $taxonomy) ) { 
     1638            // Skip if a non-existent term ID is passed. 
     1639            if ( is_int($term) ) 
     1640                continue; 
    16381641            $term_info = wp_insert_term($term, $taxonomy); 
     1642        } 
    16391643        if ( is_wp_error($term_info) ) 
    16401644            return $term_info; 
Note: See TracChangeset for help on using the changeset viewer.