From 424afb85afa2e19f30d9836440f63c5237b4102e Mon Sep 17 00:00:00 2001 From: Isabel Brison Date: Wed, 15 Dec 2021 04:06:53 +0000 Subject: [PATCH] Fix deprecated usage of passing null to explode() 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. See #53635. Props noisysocks. git-svn-id: https://develop.svn.wordpress.org/trunk@52380 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/block-supports/layout.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wp-includes/block-supports/layout.php b/src/wp-includes/block-supports/layout.php index a78aabce04..018a59a571 100644 --- a/src/wp-includes/block-supports/layout.php +++ b/src/wp-includes/block-supports/layout.php @@ -46,8 +46,8 @@ function wp_get_layout_style( $selector, $layout, $has_block_gap_support = false $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;