mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-04 20:54:29 +00:00
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:
@@ -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." ) );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user