Fix code that causes PHP 8.1 deprecation in BlockTypesController (https://github.com/woocommerce/woocommerce-blocks/pull/5287)
This commit is contained in:
parent
7e9f8c822d
commit
79722aec00
|
@ -76,7 +76,7 @@ final class BlockTypesController {
|
||||||
*/
|
*/
|
||||||
public function add_data_attributes( $content, $block ) {
|
public function add_data_attributes( $content, $block ) {
|
||||||
$block_name = $block['blockName'];
|
$block_name = $block['blockName'];
|
||||||
$block_namespace = strtok( $block_name, '/' );
|
$block_namespace = strtok( $block_name ?? '', '/' );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filters the list of allowed block namespaces.
|
* Filters the list of allowed block namespaces.
|
||||||
|
|
Loading…
Reference in New Issue