[wp-trac] [WordPress Trac] #51493: Type error in wp_xmlrpc_server::_prepare_taxonomy()
WordPress Trac
noreply at wordpress.org
Wed Nov 25 12:30:10 UTC 2020
#51493: Type error in wp_xmlrpc_server::_prepare_taxonomy()
-------------------------------------------------+-------------------------
Reporter: johnbillion | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting
| Review
Component: XML-RPC | Version: 3.7
Severity: normal | Resolution:
Keywords: needs-patch good-first-bug needs- | Focuses:
unit-tests |
-------------------------------------------------+-------------------------
Description changed by SergeyBiryukov:
Old 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].
New 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 [25133] / #20930.
--
--
Ticket URL: <https://core.trac.wordpress.org/ticket/51493#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list