Skip to content

Commit

Permalink
Layout: Fix undefined index issue (#43756)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewserong authored and priethor committed Sep 1, 2022
1 parent 235c13c commit b8b6edb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/block-supports/layout.php
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,11 @@ function gutenberg_render_layout_support_flag( $block_content, $block ) {
$used_layout['type'] = 'constrained';
}

if ( gutenberg_get_global_settings( array( 'useRootPaddingAwareAlignments' ) ) && 'constrained' === $used_layout['type'] ) {
if (
gutenberg_get_global_settings( array( 'useRootPaddingAwareAlignments' ) ) &&
isset( $used_layout['type'] ) &&
'constrained' === $used_layout['type']
) {
$class_names[] = 'has-global-padding';
}

Expand Down

0 comments on commit b8b6edb

Please sign in to comment.