From 19bad75397f7d98edfd8c51a3abc1cd1ad9a0eeb Mon Sep 17 00:00:00 2001 From: Tunji Ayoola Date: Wed, 11 Oct 2017 12:53:26 +0100 Subject: [PATCH] fix: Undefined index warning resolves: #2198 --- lib/client-assets.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/client-assets.php b/lib/client-assets.php index 90ee232f8fce47..fade6f75e59cb7 100644 --- a/lib/client-assets.php +++ b/lib/client-assets.php @@ -783,12 +783,12 @@ function gutenberg_editor_scripts_and_styles( $hook ) { $gutenberg_theme_support = get_theme_support( 'gutenberg' ); $color_palette = gutenberg_color_palette(); - if ( $gutenberg_theme_support && $gutenberg_theme_support[0]['colors'] ) { + if ( ! empty( $gutenberg_theme_support[0]['colors'] ) ) { $color_palette = $gutenberg_theme_support[0]['colors']; } $editor_settings = array( - 'wideImages' => $gutenberg_theme_support ? $gutenberg_theme_support[0]['wide-images'] : false, + 'wideImages' => ! empty( $gutenberg_theme_support[0]['wide-images'] ), 'colors' => $color_palette, );