XML-RPC: in wp_xmlrpc_server::wp_editTerm(), check ! empty when applying parent logic.

Adds unit tests.

Props hrishiv90, markoheijnen, sam2kb.
Fixes #21977.


git-svn-id: https://develop.svn.wordpress.org/trunk@34580 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor
2015-09-26 05:30:34 +00:00
parent 90ad5546d5
commit 881808bb11
2 changed files with 15 additions and 4 deletions

View File

@@ -1934,7 +1934,7 @@ class wp_xmlrpc_server extends IXR_Server {
return new IXR_Error( 403, __( 'The term name cannot be empty.' ) );
}
if ( isset( $content_struct['parent'] ) ) {
if ( ! empty( $content_struct['parent'] ) ) {
if ( ! $taxonomy['hierarchical'] )
return new IXR_Error( 403, __( "This taxonomy is not hierarchical so you can't set a parent." ) );