If the field is set to be required - core is adding default empty text - Select -
This throws an error if the CSHS widget is selected as the code access the options as array and the above option comes as translatable markup object.

The website encountered an unexpected error. Please try again later.
Error: Cannot use object of type Drupal\Core\StringTranslation\TranslatableMarkup as array in cshs_form_select_options() (line 91 of modules/contrib/cshs/cshs.module).

Comments

rakshith.thotada created an issue. See original summary.

rakshith.thotada’s picture

StatusFileSize
new2.25 KB

The patch will check for array condition before accessing the properties.

rakshith.thotada’s picture

Status: Needs work » Needs review
gaëlg’s picture

Status: Needs review » Reviewed & tested by the community

I had the same problem and the patch fixed it. Thank you!

br0ken’s picture

Assigned: rakshith.thotada » Unassigned
Status: Reviewed & tested by the community » Closed (cannot reproduce)