mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
Editor: Prevent PHP warning when accessing icon by area.
This changeset prevents an attempt to access an array via a key that doesn't exist. See https://github.com/WordPress/gutenberg/pull/52961. Props aaronrobertshaw, glendaviesnz, mukesh27. Fixes #58920. Built from https://develop.svn.wordpress.org/trunk@56316 git-svn-id: http://core.svn.wordpress.org/trunk@55828 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
c54adf1d22
commit
82bac32754
@ -250,7 +250,7 @@ function build_template_part_block_instance_variations() {
|
||||
'area' => $template_part->area,
|
||||
),
|
||||
'scope' => array( 'inserter' ),
|
||||
'icon' => $icon_by_area[ $template_part->area ],
|
||||
'icon' => isset( $icon_by_area[ $template_part->area ] ) ? $icon_by_area[ $template_part->area ] : null,
|
||||
'example' => array(
|
||||
'attributes' => array(
|
||||
'slug' => $template_part->slug,
|
||||
|
@ -16,7 +16,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.4-alpha-56315';
|
||||
$wp_version = '6.4-alpha-56316';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user