From 0405a03b5e0d85efa6d8bbe6f291270f48be56c9 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Sat, 26 Sep 2015 05:31:25 +0000 Subject: [PATCH] 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 --- wp-includes/class-wp-xmlrpc-server.php | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/class-wp-xmlrpc-server.php b/wp-includes/class-wp-xmlrpc-server.php index 14668cdc47..48422c6a92 100644 --- a/wp-includes/class-wp-xmlrpc-server.php +++ b/wp-includes/class-wp-xmlrpc-server.php @@ -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." ) ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 2ffba30c74..38fb93e29f 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -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.