XML-RPC: in `wp_xmlrpc_server::wp_editTerm()`, check `! empty` when applying `parent` logic.
Adds unit tests. Props hrishiv90, markoheijnen, sam2kb. Fixes #21977. Built from https://develop.svn.wordpress.org/trunk@34580 git-svn-id: http://core.svn.wordpress.org/trunk@34544 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
80ac048cbc
commit
0405a03b5e
|
@ -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." ) );
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.4-alpha-34579';
|
||||
$wp_version = '4.4-alpha-34580';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue