You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bug setting default swatches in colour controls (WP_DEBUG active). When setting 'palettes' or 'swatches', it seems to attempt to backfill the remainder if you include fewer than eight values in the "palettes" array.
I'm not sure of the intended utility here, but the "if" block seems redundant. The 'else' is really what you're after, I think.
Version used:
4.1.1
Using theme_mods or options?
theme_mods
PHP error messages that might be related
Trying to access array offset on value of type int in<b>/wp-content/plugins/kirki/kirki-packages/control-react-colorful/src/Control/ReactColorful.php</b> on line <b>183</b>
Code to reproduce the issue (config + field(s))
new \Kirki\Field\Color(
[
'settings' => "test",
'label' => __( 'Color Control (rgba)', 'kirki' ),
'description' => esc_html__( 'Advanced color control with alpha channel.', 'kirki' ),
'section' => 'section_id',
'default' => '#0008DC',
'choices' => [
'alpha' => true,
'palettes' => ['#ff0000', '#00ff00', '#0000ff']
],
]
);
The text was updated successfully, but these errors were encountered:
Issue description:
Bug setting default swatches in colour controls (WP_DEBUG active). When setting 'palettes' or 'swatches', it seems to attempt to backfill the remainder if you include fewer than eight values in the "palettes" array.
In the ReactColorul class at line 177:
I'm not sure of the intended utility here, but the "if" block seems redundant. The 'else' is really what you're after, I think.
Version used:
4.1.1
Using
theme_mods
oroptions
?theme_mods
PHP error messages that might be related
Code to reproduce the issue (config + field(s))
The text was updated successfully, but these errors were encountered: