--- a/wp/wp-includes/rest-api/endpoints/class-wp-rest-block-renderer-controller.php Tue Dec 15 15:52:01 2020 +0100
+++ b/wp/wp-includes/rest-api/endpoints/class-wp-rest-block-renderer-controller.php Wed Sep 21 18:19:35 2022 +0200
@@ -51,7 +51,7 @@
'args' => array(
'context' => $this->get_context_param( array( 'default' => 'view' ) ),
'attributes' => array(
- 'description' => __( 'Attributes for the block' ),
+ 'description' => __( 'Attributes for the block.' ),
'type' => 'object',
'default' => array(),
'validate_callback' => static function ( $value, $request ) {
@@ -109,7 +109,7 @@
public function get_item_permissions_check( $request ) {
global $post;
- $post_id = isset( $request['post_id'] ) ? intval( $request['post_id'] ) : 0;
+ $post_id = isset( $request['post_id'] ) ? (int) $request['post_id'] : 0;
if ( 0 < $post_id ) {
$post = get_post( $post_id );
@@ -149,7 +149,7 @@
public function get_item( $request ) {
global $post;
- $post_id = isset( $request['post_id'] ) ? intval( $request['post_id'] ) : 0;
+ $post_id = isset( $request['post_id'] ) ? (int) $request['post_id'] : 0;
if ( 0 < $post_id ) {
$post = get_post( $post_id );