diff -r c7c34916027a -r 177826044cd9 wp/wp-includes/customize/class-wp-customize-custom-css-setting.php --- a/wp/wp-includes/customize/class-wp-customize-custom-css-setting.php Mon Oct 14 18:06:33 2019 +0200 +++ b/wp/wp-includes/customize/class-wp-customize-custom-css-setting.php Mon Oct 14 18:28:13 2019 +0200 @@ -127,8 +127,8 @@ } } $id_base = $this->id_data['base']; - $value = ''; - $post = wp_get_custom_css_post( $this->stylesheet ); + $value = ''; + $post = wp_get_custom_css_post( $this->stylesheet ); if ( $post ) { $value = $post->post_content; } @@ -161,7 +161,7 @@ $validity->add( 'illegal_markup', __( 'Markup is not allowed in CSS.' ) ); } - if ( empty( $validity->errors ) ) { + if ( ! $validity->has_errors() ) { $validity = parent::validate( $css ); } return $validity; @@ -180,9 +180,12 @@ $css = ''; } - $r = wp_update_custom_css_post( $css, array( - 'stylesheet' => $this->stylesheet, - ) ); + $r = wp_update_custom_css_post( + $css, + array( + 'stylesheet' => $this->stylesheet, + ) + ); if ( $r instanceof WP_Error ) { return false;