From 5d77f8a18a429a84ba2f579b5222714bfff3f3f1 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Sat, 15 Mar 2014 05:09:14 +0000 Subject: [PATCH] XML-RPC: In wp.editPost, Remove all terms in a taxonomy when an empty array is explicitly passed. props jstraitiff, maxcutler. fixes #26686. Built from https://develop.svn.wordpress.org/trunk@27554 git-svn-id: http://core.svn.wordpress.org/trunk@27397 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-wp-xmlrpc-server.php | 1 + 1 file changed, 1 insertion(+) diff --git a/wp-includes/class-wp-xmlrpc-server.php b/wp-includes/class-wp-xmlrpc-server.php index 17657023f1..c52127f20f 100644 --- a/wp-includes/class-wp-xmlrpc-server.php +++ b/wp-includes/class-wp-xmlrpc-server.php @@ -1131,6 +1131,7 @@ class wp_xmlrpc_server extends IXR_Server { return new IXR_Error( 401, __( 'Sorry, you are not allowed to assign a term to one of the given taxonomies.' ) ); $term_ids = $post_data['terms'][$taxonomy]; + $terms[ $taxonomy ] = array(); foreach ( $term_ids as $term_id ) { $term = get_term_by( 'id', $term_id, $taxonomy );