WordPress.org

Make WordPress Core


Ignore:
Timestamp:
07/21/2008 09:53:32 PM (13 years ago)
Author:
ryan
Message:

Don't allow empty term names. Props scohoust. fixes #7336 for trunk

File:
1 edited

Legend:

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

    r8377 r8393  
    12001200        return new WP_Error('invalid_term_id', __('Invalid term ID'));
    12011201
     1202    if ( '' == trim($term) )
     1203        return new WP_Error('empty_term_name', __('A name is required for this term'));
     1204
    12021205    $defaults = array( 'alias_of' => '', 'description' => '', 'parent' => 0, 'slug' => '');
    12031206    $args = wp_parse_args($args, $defaults);
     
    14691472    $name = stripslashes($name);
    14701473    $description = stripslashes($description);
     1474
     1475    if ( '' == trim($name) )
     1476        return new WP_Error('empty_term_name', __('A name is required for this term'));
    14711477
    14721478    $empty_slug = false;
Note: See TracChangeset for help on using the changeset viewer.