Make WordPress Core


Ignore:
Timestamp:
08/14/2008 05:00:37 PM (18 years ago)
Author:
ryan
Message:

Notice fixes. Props DD32. see #7509

File:
1 edited

Legend:

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

    r8600 r8646  
    298298    global $wpdb;
    299299
    300     if ( empty($term) )
    301         return null;
    302 
    303     if ( ! is_taxonomy($taxonomy) )
    304         return new WP_Error('invalid_taxonomy', __('Invalid Taxonomy'));
     300    if ( empty($term) ) {
     301        $error = new WP_Error('invalid_term', __('Empty Term'));
     302        return $error;
     303    }
     304
     305    if ( ! is_taxonomy($taxonomy) ) {
     306        $error = new WP_Error('invalid_taxonomy', __('Invalid Taxonomy'));
     307        return $error;
     308    }
    305309
    306310    if ( is_object($term) ) {
Note: See TracChangeset for help on using the changeset viewer.