Skip to content

Commit bd1c57b

Browse files
committed
Make unit tests pass
1 parent 8ee21bb commit bd1c57b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/wp-includes/blocks.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -751,6 +751,9 @@ function get_hooked_blocks( $name ) {
751751
$block_types = WP_Block_Type_Registry::get_instance()->get_all_registered();
752752
$hooked_blocks = array();
753753
foreach ( $block_types as $block_type ) {
754+
if ( ! property_exists( $block_type, 'block_hooks' ) ) {
755+
continue;
756+
}
754757
foreach ( $block_type->block_hooks as $anchor_block_type => $relative_position ) {
755758
if ( $anchor_block_type === $name ) {
756759
$hooked_blocks[ $block_type->name ] = $relative_position;

0 commit comments

Comments
 (0)