diff --git a/EMS/common-bundle/src/Service/ElasticaService.php b/EMS/common-bundle/src/Service/ElasticaService.php index 0579f7ab6..a3e5127c4 100644 --- a/EMS/common-bundle/src/Service/ElasticaService.php +++ b/EMS/common-bundle/src/Service/ElasticaService.php @@ -454,12 +454,12 @@ private function resolveElasticsearchSearchParameters(array $parameters): array return $value; }) ->setNormalizer('body', function (Options $options, $value) { + if (null === $value || '' === $value) { + return []; + } if (\is_string($value)) { $value = \json_decode($value, true, 512, JSON_THROW_ON_ERROR); } - if (null === $value) { - return []; - } return $value; })