Skip to content

Commit

Permalink
Fix deprecated usage of passing null to explode() (#37392)
Browse files Browse the repository at this point in the history
As of PHP 8.1, explode() does not permit null as its second argument.
This results in warnings being spat out on every page because of a usage
of this in wp-includes/block-supports/layout.php.
  • Loading branch information
noisysocks authored Dec 15, 2021
1 parent 2d35b49 commit 576c891
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/block-supports/layout.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ function gutenberg_get_layout_style( $selector, $layout, $has_block_gap_support

$style = '';
if ( 'default' === $layout_type ) {
$content_size = isset( $layout['contentSize'] ) ? $layout['contentSize'] : null;
$wide_size = isset( $layout['wideSize'] ) ? $layout['wideSize'] : null;
$content_size = isset( $layout['contentSize'] ) ? $layout['contentSize'] : '';
$wide_size = isset( $layout['wideSize'] ) ? $layout['wideSize'] : '';

$all_max_width_value = $content_size ? $content_size : $wide_size;
$wide_max_width_value = $wide_size ? $wide_size : $content_size;
Expand Down

0 comments on commit 576c891

Please sign in to comment.