Make WordPress Core

Opened 4 years ago

Closed 3 years ago

#51493 closed defect (bug) (fixed)

Type error in wp_xmlrpc_server::_prepare_taxonomy()

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

Description (last modified by SergeyBiryukov)

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


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 [25133] / #20930.

Change History (3)

#1 @SergeyBiryukov
4 years ago

  • Description modified (diff)

#2 @johnbillion
3 years ago

  • Milestone changed from Awaiting Review to 5.7

#3 @johnbillion
3 years ago

  • Owner set to johnbillion
  • Resolution set to fixed
  • Status changed from new to closed

In 49856:

XML-RPC: Fix a type error when requesting the menu field of a taxonomy.

Fixes #51493

Note: See TracTickets for help on using tickets.