diff --git a/projects/plugins/wpcomsh/changelog/fix-warnings-on-any-theme-using-customizer-colors b/projects/plugins/wpcomsh/changelog/fix-warnings-on-any-theme-using-customizer-colors new file mode 100644 index 0000000000000..da207bfd8be38 --- /dev/null +++ b/projects/plugins/wpcomsh/changelog/fix-warnings-on-any-theme-using-customizer-colors @@ -0,0 +1,4 @@ +Significance: patch +Type: fixed + +Fix: Undefined array key warnings on any customizer theme with colors. diff --git a/projects/plugins/wpcomsh/custom-colors/colors.php b/projects/plugins/wpcomsh/custom-colors/colors.php index b2a4405482e8d..15f56c8ee244c 100644 --- a/projects/plugins/wpcomsh/custom-colors/colors.php +++ b/projects/plugins/wpcomsh/custom-colors/colors.php @@ -1421,8 +1421,12 @@ public static function override_themecolors() { $colors = $opts['colors']; - $colors['border'] = $colors['fg1']; - $colors['url'] = $colors['link']; + if ( isset( $colors['fg1'] ) ) { + $colors['border'] = $colors['fg1']; + } + if ( isset( $colors['link'] ) ) { + $colors['url'] = $colors['link']; + } if ( isset( $colors['txt'] ) ) { $colors['text'] = $colors['txt']; }