mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-04 20:54:29 +00:00
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
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user