10000 bug #11170 [Console] Fixed notice in QuestionHelper (florianv) · symfony/symfony@bebd18c · GitHub
[go: up one dir, main page]

Skip to content

Commit bebd18c

Browse files
committed
bug #11170 [Console] Fixed notice in QuestionHelper (florianv)
This PR was merged into the 2.5 branch. Discussion ---------- [Console] Fixed notice in QuestionHelper | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | License | MIT When pressing escape in a question, a notice is shown because the sequence is only 2 characters long. Commits ------- 9fe4b88 [Console] Fixed notice in QuestionHelper
2 parents 598d85c + 9fe4b88 commit bebd18c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/Console/Helper/QuestionHelper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ private function autocomplete(OutputInterface $output, Question $question, $inpu
212212
$c .= fread($inputStream, 2);
213213

214214
// A = Up Arrow. B = Down Arrow
215-
if ('A' === $c[2] || 'B' === $c[2]) {
215+
if (isset($c[2]) && ('A' === $c[2] || 'B' === $c[2])) {
216216
if ('A' === $c[2] && -1 === $ofs) {
217217
$ofs = 0;
218218
}

0 commit comments

Comments
 (0)
0