If value is '' and multiple is true then return an empty array

This commit is contained in:
Julie Lenaerts 2025-01-07 16:41:14 +01:00
parent 184bb095d8
commit 2ca9de2f60

View File

@ -28,8 +28,8 @@ class EntityToJsonTransformer implements DataTransformerInterface
public function reverseTransform($value)
{
if (false === $this->multiple && '' === $value) {
return null;
if ($this->multiple && '' === $value) {
return [];
}
if ($this->multiple && [] === $value) {