From 09085e55fc5a3703c44dc597f6b8a4ad4b6b1663 Mon Sep 17 00:00:00 2001 From: Shishir <75600200+shishir-intelli@users.noreply.github.com> Date: Mon, 21 Nov 2022 16:51:13 +0530 Subject: [PATCH] Fix error while edit team app (#752) --- .../apigee_edge_teams/src/Entity/Form/TeamAppEditForm.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/apigee_edge_teams/src/Entity/Form/TeamAppEditForm.php b/modules/apigee_edge_teams/src/Entity/Form/TeamAppEditForm.php index 4a867c264..6ec896bb0 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; }