diff --git a/src/Bundle/ChillPersonBundle/Export/Export/ListPerson.php b/src/Bundle/ChillPersonBundle/Export/Export/ListPerson.php index 50b0f3d72..d3bc2728a 100644 --- a/src/Bundle/ChillPersonBundle/Export/Export/ListPerson.php +++ b/src/Bundle/ChillPersonBundle/Export/Export/ListPerson.php @@ -425,7 +425,9 @@ class ListPerson implements ExportElementValidatedInterface, ListInterface if ('_header' === $value) { return $this->translatableStringHelper->localize($cf->getName()); } - + if (null === $value) { + return ''; + } return $this->customFieldProvider ->getCustomFieldByType($cf->getType()) ->render(json_decode($value, true), $cf, 'csv'); @@ -434,6 +436,9 @@ class ListPerson implements ExportElementValidatedInterface, ListInterface if ($cfType instanceof CustomFieldChoice && $cfType->isMultiple($cf)) { return function ($value) use ($cf, $cfType, $key) { $slugChoice = $this->extractInfosFromSlug($key)['additionnalInfos']['choiceSlug']; + if (null === $value) { + return ''; + } $decoded = json_decode($value, true); if ('_header' === $value) { @@ -459,7 +464,7 @@ class ListPerson implements ExportElementValidatedInterface, ListInterface */ private function slugToDQL(string $slug, string $type = 'default', array $additionalInfos = []): string { - $uid = 'slug_' . uniqid('', true); + $uid = 'slug_' . uniqid('', false); $this->slugs[$uid] = [ 'slug' => $slug,