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
This commit is contained in:
commit
bebd18cbd1
@ -212,7 +212,7 @@ class QuestionHelper extends Helper
|
||||
$c .= fread($inputStream, 2);
|
||||
|
||||
// A = Up Arrow. B = Down Arrow
|
||||
if ('A' === $c[2] || 'B' === $c[2]) {
|
||||
if (isset($c[2]) && ('A' === $c[2] || 'B' === $c[2])) {
|
||||
if ('A' === $c[2] && -1 === $ofs) {
|
||||
$ofs = 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user