Skip to content

Commit 492de6d

Browse files
committed
do not pass the empty string to ord()
1 parent d42098f commit 492de6d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Helper/QuestionHelper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ private function autocomplete(OutputInterface $output, Question $question, $inpu
317317
$ofs += ('A' === $c[2]) ? -1 : 1;
318318
$ofs = ($numMatches + $ofs) % $numMatches;
319319
}
320-
} elseif (\ord($c) < 32) {
320+
} elseif ('' === $c || \ord($c) < 32) {
321321
if ("\t" === $c || "\n" === $c) {
322322
if ($numMatches > 0 && -1 !== $ofs) {
323323
$ret = (string) $matches[$ofs];

0 commit comments

Comments
 (0)