Skip to content

Commit 18f0dda

Browse files
committed
bug #14888 [Console] Fix ask and askHidden methods (dosten)
This PR was merged into the 2.7 branch. Discussion ---------- [Console] Fix ask and askHidden methods | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #14885 | License | MIT | Doc PR | - Commits ------- 5bb2cc8 Fix ask and askHidden methods
2 parents d1404a6 + 5bb2cc8 commit 18f0dda

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Symfony/Component/Console/Style/SymfonyStyle.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ public function ask($question, $default = null, $validator = null)
205205
$question = new Question($question, $default);
206206
$question->setValidator($validator);
207207

208-
return $this->askQuestion($question, $validator);
208+
return $this->askQuestion($question);
209209
}
210210

211211
/**
@@ -214,9 +214,11 @@ public function ask($question, $default = null, $validator = null)
214214
public function askHidden($question, $validator = null)
215215
{
216216
$question = new Question($question);
217+
217218
$question->setHidden(true);
219+
$question->setValidator($validator);
218220

219-
return $this->askQuestion($question, $validator);
221+
return $this->askQuestion($question);
220222
}
221223

222224
/**

0 commit comments

Comments
 (0)