diff --git a/wp-includes/class-wp-block-supports.php b/wp-includes/class-wp-block-supports.php index a8e2ecb36b..d6ef909af5 100644 --- a/wp-includes/class-wp-block-supports.php +++ b/wp-includes/class-wp-block-supports.php @@ -94,8 +94,7 @@ class WP_Block_Supports { * @return string[] Array of HTML attributes. */ public function apply_block_supports() { - $block_attributes = self::$block_to_render['attrs']; - $block_type = WP_Block_Type_Registry::get_instance()->get_registered( + $block_type = WP_Block_Type_Registry::get_instance()->get_registered( self::$block_to_render['blockName'] ); @@ -104,6 +103,10 @@ class WP_Block_Supports { return array(); } + $block_attributes = array_key_exists( 'attrs', self::$block_to_render ) + ? self::$block_to_render['attrs'] + : array(); + $output = array(); foreach ( $this->block_supports as $block_support_config ) { if ( ! isset( $block_support_config['apply'] ) ) { diff --git a/wp-includes/version.php b/wp-includes/version.php index e9fe6a5875..71bbc89eee 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.1-beta3-54497'; +$wp_version = '6.1-beta3-54498'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.