From 99ead03008e4df5318832670947154b410459e5c Mon Sep 17 00:00:00 2001 From: Arlina Espinoza Rhoton Date: Tue, 11 Aug 2020 11:09:03 -0700 Subject: [PATCH] Fix whitescreen error when selecting "skip" on edge connection settings in Kickstart. (#465) --- src/Plugin/KeyInput/ApigeeAuthKeyInput.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Plugin/KeyInput/ApigeeAuthKeyInput.php b/src/Plugin/KeyInput/ApigeeAuthKeyInput.php index a9a7808f..0aa4ee16 100644 --- a/src/Plugin/KeyInput/ApigeeAuthKeyInput.php +++ b/src/Plugin/KeyInput/ApigeeAuthKeyInput.php @@ -267,11 +267,13 @@ public function processSubmittedKeyValue(FormStateInterface $form_state) { $input_values['client_id'] = ''; $input_values['client_secret'] = ''; } - // Remove unneeded values if on a Public or Private instance. else { + // Remove unneeded values if on a Public or Private instance. $input_values['account_json_key'] = ''; - // If password field is empty we just skip it and preserve initial password. - if (empty($input_values['password'])) { + + // If password field is empty we just skip it and preserve the initial + // password if there is one already. + if (empty($input_values['password']) && !empty($form_state->get('key_value')['current'])) { $values = $this->getFormDefaultValues($form_state); if (!empty($values['password'])) { $input_values['password'] = $values['password'];