diff --git a/modules/apigee_edge_teams/src/Entity/Form/TeamAppEditForm.php b/modules/apigee_edge_teams/src/Entity/Form/TeamAppEditForm.php index 4a867c26..6ec896bb 100644 --- a/modules/apigee_edge_teams/src/Entity/Form/TeamAppEditForm.php +++ b/modules/apigee_edge_teams/src/Entity/Form/TeamAppEditForm.php @@ -97,8 +97,10 @@ protected function appCredentialController(string $owner, string $app_name): App */ public function form(array $form, FormStateInterface $form_state) { $form = parent::form($form, $form_state); - foreach (Element::children($form['credential']) as $credential) { - $form['credential'][$credential]['api_products'] += $this->nonMemberApiProductAccessWarningElement($form, $form_state); + if (isset($form['credential'])) { + foreach (Element::children($form['credential']) as $credential) { + $form['credential'][$credential]['api_products'] += $this->nonMemberApiProductAccessWarningElement($form, $form_state); + } } return $form; }