Make WordPress Core

Changeset 8394


Ignore:
Timestamp:
07/21/2008 09:54:16 PM (18 years ago)
Author:
ryan
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.6/wp-includes/taxonomy.php

    r8364 r8394  
    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.