shopware
shopware copied to clipboard
Improve converting options with null/empty-string values for "combobox" in AttributeConverter
The AttributeConverter throws an error when attempting to process null or empty values for combobox options:
{noformat}[error] SWAG_MIGRATION_RUN_EXCEPTION An exception occurred Entity: product_custom_field, sourceId: - json_decode(): Argument #1 ($json) must be of type string, null given{noformat}
In SW5 it was possible to create attributes/custom fields of the type "combobox" without saving options > NULL values. It was also possible to convert an already created type (example: txpe "text" or "boolean" always have empty sting values) into a combobox. If no options are stored there, the value remains an empty string.