diff --git a/src/wp-includes/rest-api/endpoints/class-wp-rest-revisions-controller.php b/src/wp-includes/rest-api/endpoints/class-wp-rest-revisions-controller.php index 08a8479678002..9351caa7bc214 100644 --- a/src/wp-includes/rest-api/endpoints/class-wp-rest-revisions-controller.php +++ b/src/wp-includes/rest-api/endpoints/class-wp-rest-revisions-controller.php @@ -403,7 +403,7 @@ public function get_item( $request ) { return $revision; } - if ( $parent->ID !== $revision->post_parent ) { + if ( (int) $parent->ID !== (int) $revision->post_parent ) { return new WP_Error( 'rest_post_invalid_parent', /* translators: %s: A post revision id. */