diff --git a/lib/compat/wordpress-6.6/resolve-patterns.php b/lib/compat/wordpress-6.6/resolve-patterns.php index 3243ba39fd781..dafda83266768 100644 --- a/lib/compat/wordpress-6.6/resolve-patterns.php +++ b/lib/compat/wordpress-6.6/resolve-patterns.php @@ -71,6 +71,9 @@ function gutenberg_replace_pattern_blocks_get_block_templates( $templates ) { } function gutenberg_replace_pattern_blocks_get_block_template( $template ) { + if ( null === $template ) { + return $template; + } $blocks = parse_blocks( $template->content ); $blocks = gutenberg_replace_pattern_blocks( $blocks ); $template->content = serialize_blocks( $blocks );