summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/Command/User/ResetPassword.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/core/Command/User/ResetPassword.php b/core/Command/User/ResetPassword.php
index 3388ef6a1bd..56260e9714a 100644
--- a/core/Command/User/ResetPassword.php
+++ b/core/Command/User/ResetPassword.php
@@ -100,6 +100,11 @@ class ResetPassword extends Command {
$question->setHidden(true);
$password = $helper->ask($input, $output, $question);
+ if ($password === null) {
+ $output->writeln("<error>Password cannot be empty!</error>");
+ return 1;
+ }
+
$question = new Question('Confirm the new password: ');
$question->setHidden(true);
$confirm = $helper->ask($input, $output, $question);