Skip to content

Commit

Permalink
Fix incorrectly reinitializing array during loop
Browse files Browse the repository at this point in the history
  • Loading branch information
talldan committed Jun 3, 2024
1 parent 4d5e601 commit ef2f760
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/wp-includes/class-wp-block.php
Original file line number Diff line number Diff line change
Expand Up @@ -268,11 +268,12 @@ private function process_block_bindings() {
isset( $bindings['__default']['source'] ) &&
'core/pattern-overrides' === $bindings['__default']['source']
) {
$updated_bindings = array();

// Build an binding array of all supported attributes.
// Note that this also omits the `__default` attribute from the
// resulting array.
foreach ( $supported_block_attributes[ $parsed_block['blockName'] ] as $attribute_name ) {
$updated_bindings = array();
// Retain any non-pattern override bindings that might be present.
$updated_bindings[ $attribute_name ] = isset( $bindings[ $attribute_name ] )
? $bindings[ $attribute_name ]
Expand Down

0 comments on commit ef2f760

Please sign in to comment.