Skip to content
This repository was archived by the owner on Feb 23, 2020. It is now read-only.

Commit 593cc88

Browse files
committed
Fixed an issue with registrant setting form when a entity type is no longer available.
1 parent e715f61 commit 593cc88

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/Form/RegistrantSettingsForm.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,14 @@ public function buildForm(array $form, FormStateInterface $form_state) {
9898
$channels = $this->identityChannelManager->getChannelsForIdentityType($identity_type);
9999
$channels_string = [];
100100
foreach ($channels as $channel) {
101-
$entity_type = $this->entityManager->getDefinition($channel);
102-
$channels_string[] = $entity_type->getLabel();
101+
if ($channel_entity_type = $this->entityManager->getDefinition($channel, FALSE)) {
102+
$channels_string[] = $channel_entity_type->getLabel();
103+
}
103104
}
104105

105-
$entity_type = $this->entityManager->getDefinition($identity_type);
106+
if (!$entity_type = $this->entityManager->getDefinition($identity_type, FALSE)) {
107+
continue;
108+
}
106109

107110
$form['contactables'][$identity_type] = [
108111
'#type' => 'checkbox',

0 commit comments

Comments
 (0)