mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
Editor: fix undefined array key warning.
Checks if `attrs` array key exists before using its value. Props mukesh27, kafleg. Fixes #59468. git-svn-id: https://develop.svn.wordpress.org/trunk@56731 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -48,7 +48,7 @@ function wp_register_background_support( $block_type ) {
|
||||
*/
|
||||
function wp_render_background_support( $block_content, $block ) {
|
||||
$block_type = WP_Block_Type_Registry::get_instance()->get_registered( $block['blockName'] );
|
||||
$block_attributes = $block['attrs'];
|
||||
$block_attributes = ( isset( $block['attrs'] ) && is_array( $block['attrs'] ) ) ? $block['attrs'] : array();
|
||||
$has_background_image_support = block_has_support( $block_type, array( 'background', 'backgroundImage' ), false );
|
||||
|
||||
if (
|
||||
|
||||
Reference in New Issue
Block a user