Fix undefined array key warning

This commit is contained in:
Matt Sherman 2023-10-18 09:51:54 -04:00
parent 48d5cca0b8
commit e6a197cbb2
1 changed files with 2 additions and 2 deletions

View File

@ -200,8 +200,8 @@ class BlockRegistry {
return register_block_type_from_metadata(
$block_json_file,
[
'attributes' => $this->augment_attributes( $metadata['attributes'] ),
'uses_context' => $this->augment_uses_context( $metadata['usesContext'] ),
'attributes' => $this->augment_attributes( isset( $metadata['attributes'] ) ? $metadata['attributes'] : [] ),
'uses_context' => $this->augment_uses_context( isset( $metadata['usesContext'] ) ? $metadata['usesContext'] : [] ),
]
);
}