- Issue created by @johankleene
- Status changed to Needs review
about 1 year ago 1:52pm 11 January 2024 - last update
about 1 year ago 9 pass
When using color field widget box this error occurs:
TypeError: preg_match_all(): Argument #2 ($subject) must be of type string, null given in preg_match_all() (line 123 of /modules/contrib/color_field/src/Plugin/Field/FieldWidget/ColorFieldWidgetBox.php).
Use the widget.
getSetting() will return null when nothing is set yet. preg_match_all expects a string, so give it a string when getSetting returns null.
See patch.
Review
Needs review
3.0
Code