#48616 closed defect (bug) (fixed)
Parameter type for $item in WP_REST_Terms_Controller::prepare_item_for_response() uses invalid phpdoc keyword
Reported by: | diddledani | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | 5.4 | Priority: | normal |
Severity: | trivial | Version: | 4.7 |
Component: | REST API | Keywords: | has-patch |
Focuses: | docs | Cc: |
Description
In wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php
the param type of $item
for WP_REST_Terms_Controller::prepare_item_for_response()
is documented as obj
, which is not a valid keyword according to the phpdoc specification: https://docs.phpdoc.org/guides/types.html
The attached patch corrects obj
to be object
.
Attachments (1)
Change History (5)
#1
@
5 years ago
- Milestone changed from Awaiting Review to 5.4
- Version changed from trunk to 4.7
Thanks for the patch @diddledan. It looks like this could be further narrowed to WP_Term
.
#2
@
5 years ago
I had the same thought, but decided to err on the side of caution as I'm not very familiar with the code :-)
Note: See
TracTickets for help on using
tickets.
Patch to set param type to object