Opened 9 years ago
Closed 9 years ago
#39871 closed defect (bug) (fixed)
REST API: Revision author ID is returned as a string
| Reported by: | jnylen0 | Owned by: | jnylen0 |
|---|---|---|---|
| Priority: | normal | Milestone: | 4.7.3 |
| Component: | REST API | Version: | 4.7 |
| Severity: | normal | Keywords: | has-patch has-unit-tests fixed-major |
| Cc: | Focuses: |
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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
In 40063: