diff --git a/src/Bundle/ChillPersonBundle/Form/DataMapper/PersonIdentifiersDataMapper.php b/src/Bundle/ChillPersonBundle/Form/DataMapper/PersonIdentifiersDataMapper.php index f3bcfe1d5..c89b1485f 100644 --- a/src/Bundle/ChillPersonBundle/Form/DataMapper/PersonIdentifiersDataMapper.php +++ b/src/Bundle/ChillPersonBundle/Form/DataMapper/PersonIdentifiersDataMapper.php @@ -38,7 +38,12 @@ final readonly class PersonIdentifiersDataMapper implements DataMapperInterface if (!$worker->getDefinition()->isEditableByUsers()) { continue; } - $form = $formsByKey['identifier_'.$worker->getDefinition()->getId()]; + + $form = $formsByKey['identifier_'.$worker->getDefinition()->getId()] ?? null; + if (null === $form) { + continue; + } + $identifier = $viewData->findFirst(fn (int $key, PersonIdentifier $identifier) => $worker->getDefinition() === $identifier->getDefinition()); if (null === $identifier) { $identifier = new PersonIdentifier($worker->getDefinition()); diff --git a/src/Bundle/ChillPersonBundle/PersonIdentifier/PersonIdentifierEngineInterface.php b/src/Bundle/ChillPersonBundle/PersonIdentifier/PersonIdentifierEngineInterface.php index 4ebfbbabd..90b50df3c 100644 --- a/src/Bundle/ChillPersonBundle/PersonIdentifier/PersonIdentifierEngineInterface.php +++ b/src/Bundle/ChillPersonBundle/PersonIdentifier/PersonIdentifierEngineInterface.php @@ -34,7 +34,7 @@ interface PersonIdentifierEngineInterface public function isEmpty(PersonIdentifier $identifier): bool; /** - * Return a list of @link{IdentifierViolationDTO} to generatie violation errors. + * Return a list of @see{IdentifierViolationDTO} to generatie violation errors. * * @return list */