Make WordPress Core


Ignore:
Timestamp:
06/20/2007 10:06:29 PM (19 years ago)
Author:
ryan
Message:

Don't create '0' categories. fixes #4413

File:
1 edited

Legend:

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

    r5728 r5739  
    382382
    383383    if ( is_int($term) ) {
     384        if ( 0 == $term )
     385            return 0;
    384386        $where = "t.term_id = '$term'";
    385387    } else {
     
    601603        return new WP_Error('invalid_taxonomy', __('Invalid taxonomy'));
    602604
     605    if ( is_int($term) && 0 == $term )
     606        return new WP_Error('invalid_term_id', __('Invalid term ID'));
     607
    603608    $defaults = array( 'alias_of' => '', 'description' => '', 'parent' => 0, 'slug' => '');
    604609    $args = wp_parse_args($args, $defaults);
Note: See TracChangeset for help on using the changeset viewer.