From 83ddc64594e6831acf81e2cbff41558889c8c838 Mon Sep 17 00:00:00 2001 From: ramon Date: Tue, 14 Nov 2023 10:12:33 +1100 Subject: [PATCH] Coerce types --- .../rest-api/endpoints/class-wp-rest-revisions-controller.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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. */