diff -r be944660c56a -r 3d72ae0968f4 wp/wp-includes/rest-api/endpoints/class-wp-rest-block-renderer-controller.php --- a/wp/wp-includes/rest-api/endpoints/class-wp-rest-block-renderer-controller.php Wed Sep 21 18:19:35 2022 +0200 +++ b/wp/wp-includes/rest-api/endpoints/class-wp-rest-block-renderer-controller.php Tue Sep 27 16:37:53 2022 +0200 @@ -103,6 +103,8 @@ * * @since 5.0.0 * + * @global WP_Post $post Global post object. + * * @param WP_REST_Request $request Request. * @return true|WP_Error True if the request has read access, WP_Error object otherwise. */ @@ -111,7 +113,7 @@ $post_id = isset( $request['post_id'] ) ? (int) $request['post_id'] : 0; - if ( 0 < $post_id ) { + if ( $post_id > 0 ) { $post = get_post( $post_id ); if ( ! $post || ! current_user_can( 'edit_post', $post->ID ) ) { @@ -143,6 +145,8 @@ * * @since 5.0.0 * + * @global WP_Post $post Global post object. + * * @param WP_REST_Request $request Full details about the request. * @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure. */ @@ -151,7 +155,7 @@ $post_id = isset( $request['post_id'] ) ? (int) $request['post_id'] : 0; - if ( 0 < $post_id ) { + if ( $post_id > 0 ) { $post = get_post( $post_id ); // Set up postdata since this will be needed if post_id was set.