id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc,focuses 39871,REST API: Revision author ID is returned as a string,jnylen0,jnylen0,"Apparently `post_author` is a string in the WP internals, ""[https://core.trac.wordpress.org/browser/tags/4.7.2/src/wp-includes/class-wp-post.php?marks=34#L31 for compatibility reasons]"". In `WP_REST_Posts_Controller` we [https://core.trac.wordpress.org/browser/tags/4.7.2/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php#L1469 cast it to an integer] before returning it in the response. In `WP_REST_Revisions_Controller` we [https://core.trac.wordpress.org/browser/tags/4.7.2/src/wp-includes/rest-api/endpoints/class-wp-rest-revisions-controller.php#L346 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 [https://core.trac.wordpress.org/browser/tags/4.7.2/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php?marks=1896#L1893 posts] and [https://core.trac.wordpress.org/browser/tags/4.7.2/src/wp-includes/rest-api/endpoints/class-wp-rest-revisions-controller.php?marks=472#L469 revisions].",defect (bug),closed,normal,4.7.3,REST API,4.7,normal,fixed,has-patch has-unit-tests fixed-major,,