WordPress.org

Make WordPress Core

Opened 3 months ago

Closed 3 months ago

#53543 closed defect (bug) (duplicate)

Taxonomy Rest Controller return non numeric array

Reported by: loriminciotti Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: REST API Keywords: needs-patch
Focuses: Cc:

Description

In the GetItems function get_items of class-wp-rest-taxonomies-controller.php the response is not a numeric array but an associative array. This cause a bug when call Rest api with global parameter _field. In the function rest_filter_response_fields in rest-api.php there is a check if array is numeric, so this check is not passed and the api return an empty array.

Change History (1)

#1 @TimothyBlynJacobs
3 months ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Severity changed from critical to normal
  • Status changed from new to closed

Hi @loriminciotti,

Thanks for reporting the issue and welcome to trac! We're already tracking this issue in #50012, so I'm closing this issue out as a duplicate so we can keep the discussion in one place.

Note: See TracTickets for help on using tickets.