From fca25d5e2fb4c283800d4e7b62799828f2032160 Mon Sep 17 00:00:00 2001 From: Vara Date: Thu, 7 Sep 2023 07:08:48 +0530 Subject: [PATCH] Add check for block_patterns before using concatenation --- includes/Data/Patterns.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/includes/Data/Patterns.php b/includes/Data/Patterns.php index 849a02d0f..79015a227 100644 --- a/includes/Data/Patterns.php +++ b/includes/Data/Patterns.php @@ -392,7 +392,11 @@ public static function get_theme_step_patterns_from_step( $step, $squash = false ); continue; } - $block_patterns .= self::cleanup_wp_grammar( $pattern['content'] ); + if (isset($block_patterns)) { + $block_patterns .= self::cleanup_wp_grammar( $pattern['content'] ); + } else { + $block_patterns = self::cleanup_wp_grammar( $pattern['content'] ); + } } if ( isset( self::get_theme_step_filters()[ $active_theme ][ $step ] ) ) {