Skip to content

Commit

Permalink
null coalescing operator (??) is not present in PHP
Browse files Browse the repository at this point in the history
  • Loading branch information
ramonjd committed Feb 16, 2022
1 parent 1337789 commit 69dd44f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/block-supports/layout.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ function gutenberg_get_layout_style( $selector, $layout, $has_block_gap_support
$style .= "$selector .alignright { float: right; margin-left: 2em; margin-right: 0; }";
if ( $has_block_gap_support ) {
if ( is_array( $gap_value ) ) {
$gap_value = $gap_value['top'] ?? null;
$gap_value = isset( $gap_value['top'] ) ? $gap_value['top'] : null;
}
$gap_style = $gap_value ? $gap_value : 'var( --wp--style--block-gap )';
$style .= "$selector > * { margin-top: 0; margin-bottom: 0; }";
Expand Down

0 comments on commit 69dd44f

Please sign in to comment.