WordPress.org

Make WordPress Core

Opened 2 weeks ago

#51493 new defect (bug)

Type error in wp_xmlrpc_server::_prepare_taxonomy()

Reported by: johnbillion Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 3.7
Component: XML-RPC Keywords: needs-patch good-first-bug needs-unit-tests
Focuses: Cc:

Description

There's a type error in the wp_xmlrpc_server::_prepare_taxonomy() method.

Ref: https://core.trac.wordpress.org/browser/tags/5.5.1/src/wp-includes/class-wp-xmlrpc-server.php?marks=768-770#L742

If $fields array contains a menu element then it tries to read the show_in_menu property from $_taxonomy, but this is an array not an object.

Probably just needs $_taxonomy changed to $taxonomy but needs testing, ideally needs a unit test and steps to reproduce.

Introduced in [20930].

Change History (0)

Note: See TracTickets for help on using tickets.