diff --git a/core/modules/user/src/AccountForm.php b/core/modules/user/src/AccountForm.php index e96c4dfa166..7f51ad6fc43 100644 --- a/core/modules/user/src/AccountForm.php +++ b/core/modules/user/src/AccountForm.php @@ -374,7 +374,7 @@ abstract class AccountForm extends ContentEntityForm implements TrustedCallbackI } // Set existing password if set in the form state. - $current_pass = trim($form_state->getValue('current_pass')); + $current_pass = trim($form_state->getValue('current_pass', '')); if (strlen($current_pass) > 0) { $account->setExistingPassword($current_pass); }