Opened 8 years ago
Closed 8 years ago
#39871 closed defect (bug) (fixed)
REST API: Revision author ID is returned as a string
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 4.7.3 | Priority: | normal |
Severity: | normal | Version: | 4.7 |
Component: | REST API | Keywords: | has-patch has-unit-tests fixed-major |
Focuses: | Cc: |
Description
Apparently post_author
is a string in the WP internals, "for compatibility reasons".
In WP_REST_Posts_Controller
we cast it to an integer before returning it in the response.
In WP_REST_Revisions_Controller
we don't do the corresponding cast.
The result is that the author
ID is returned as a string, even though it is documented as an integer for both posts and revisions.
Attachments (1)
Change History (4)
Note: See
TracTickets for help on using
tickets.
In 40063: