Make WordPress Core

Ticket #21977: 21977.diff

File 21977.diff, 926 bytes (added by markoheijnen, 12 years ago)

Patch from root instead of wp-includes folder

  • wp-includes/class-wp-xmlrpc-server.php

     
    15611561                if ( empty( $term_data['name'] ) )
    15621562                        return new IXR_Error( 403, __( 'The term name cannot be empty.' ) );
    15631563
    1564                 if ( isset( $content_struct['parent'] ) ) {
     1564                if ( ! empty( $content_struct['parent'] ) ) {
    15651565                        if ( ! $taxonomy['hierarchical'] )
    15661566                                return new IXR_Error( 403, __( 'This taxonomy is not hierarchical.' ) );
    15671567
     
    16601660                                return new IXR_Error( 403, __( 'The term name cannot be empty.' ) );
    16611661                }
    16621662
    1663                 if ( isset( $content_struct['parent'] ) ) {
     1663                if ( ! empty( $content_struct['parent'] ) ) {
    16641664                        if ( ! $taxonomy['hierarchical'] )
    16651665                                return new IXR_Error( 403, __( "This taxonomy is not hierarchical so you can't set a parent." ) );
    16661666