Fix EntityToJsonTransformer for saved exports

This commit is contained in:
Julie Lenaerts 2025-01-07 16:57:06 +01:00
parent 184bb095d8
commit 27b2d77fdb
3 changed files with 9 additions and 2 deletions

3
.changes/v3.5.3.md Normal file
View File

@ -0,0 +1,3 @@
## v3.5.3 - 2025-01-07
### Fixed
* Fix the EntityToJsonTransformer to return an empty array if the value is ""

View File

@ -6,6 +6,10 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html),
and is generated by [Changie](https://github.com/miniscruff/changie).
## v3.5.3 - 2025-01-07
### Fixed
* Fix the EntityToJsonTransformer to return an empty array if the value is ""
## v3.5.2 - 2024-12-19
### Fixed
* ([#345](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/345)) Export: activity filtering of users that were associated to an activity between certain dates. Results contained activities that were not within the specified date range"

View File

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