Skip to content

Commit

Permalink
fix: undefined index PHP notice for background-color
Browse files Browse the repository at this point in the history
  • Loading branch information
aristath committed Jun 24, 2018
1 parent fe986b5 commit 95ca010
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/css/field/class-kirki-output-field-background.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ protected function process_output( $output, $value ) {
foreach ( array( 'background-image', 'background-color', 'background-repeat', 'background-position', 'background-size', 'background-attachment' ) as $property ) {

// See https://github.com/aristath/kirki/issues/1808.
if ( 'background-color' === $property && ( ! isset( $value['background-image'] ) || empty( $value['background-image'] ) ) ) {
if ( 'background-color' === $property && isset( $value['background-color'] ) && ( ! isset( $value['background-image'] ) || empty( $value['background-image'] ) ) ) {
$this->styles[ $output['media_query'] ][ $output['element'] ]['background'] = $output['prefix'] . $this->process_property_value( $property, $value[ $property ] ) . $output['suffix'];
}

Expand Down

0 comments on commit 95ca010

Please sign in to comment.