From 5b64c8f3fa2728fbd4bd3bc04f876cf285342d5d Mon Sep 17 00:00:00 2001 From: hellofromtonya Date: Wed, 10 Aug 2022 08:49:00 -0500 Subject: [PATCH] Skips if individual style property not defined --- packages/style-engine/class-wp-style-engine.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/style-engine/class-wp-style-engine.php b/packages/style-engine/class-wp-style-engine.php index d8a598a833a30..a7fdf38a492c8 100644 --- a/packages/style-engine/class-wp-style-engine.php +++ b/packages/style-engine/class-wp-style-engine.php @@ -410,6 +410,11 @@ protected static function get_css_declarations( $style_value, $style_definition, // If the input contains an array, assume box model-like properties // for styles such as margins and padding. if ( is_array( $style_value ) ) { + // Bail out early if the `'individual'` property is not defined. + if ( ! isset( $style_property_keys['individual'] ) ) { + return $css_declarations; + } + foreach ( $style_value as $key => $value ) { if ( is_string( $value ) && strpos( $value, 'var:' ) !== false && ! $should_skip_css_vars && ! empty( $style_definition['css_vars'] ) ) { $value = static::get_css_var_value( $value, $style_definition['css_vars'] );