Skip to content

Commit

Permalink
Add check for block_patterns before using concatenation
Browse files Browse the repository at this point in the history
  • Loading branch information
mr-vara committed Sep 7, 2023
1 parent a0217ee commit fca25d5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion includes/Data/Patterns.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 ] ) ) {
Expand Down

0 comments on commit fca25d5

Please sign in to comment.