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'] );