diff --git a/core/modules/simpletest/lib/Drupal/simpletest/Form/SimpletestSettingsForm.php b/core/modules/simpletest/lib/Drupal/simpletest/Form/SimpletestSettingsForm.php index fa94f33..cce1a8a 100644 --- a/core/modules/simpletest/lib/Drupal/simpletest/Form/SimpletestSettingsForm.php +++ b/core/modules/simpletest/lib/Drupal/simpletest/Form/SimpletestSettingsForm.php @@ -26,8 +26,8 @@ public function getFormID() { public function buildForm(array $form, array &$form_state) { $config = $this->configFactory->get('simpletest.settings'); $form['general'] = array( - '#type' => 'details', - '#title' => t('General'), + '#type' => 'details', + '#title' => t('General'), ); $form['general']['simpletest_clear_results'] = array( '#type' => 'checkbox', @@ -86,10 +86,11 @@ public function buildForm(array $form, array &$form_state) { * Implements \Drupal\Core\Form\FormInterface::validateForm(). */ public function validateForm(array &$form, array &$form_state) { + $config = $this->configFactory->get('simpletest.settings'); // If a username was provided but a password wasn't, preserve the existing // password. if (!empty($form_state['values']['simpletest_httpauth_username']) && empty($form_state['values']['simpletest_httpauth_password'])) { - $form_state['values']['simpletest_httpauth_password'] = config('simpletest.settings')->get('httpauth.password'); + $form_state['values']['simpletest_httpauth_password'] = $config->get('httpauth.password'); } // If a password was provided but a username wasn't, the credentials are