[Console] Handle false return value from readline
"readline()" returns "false" when the user presses CTRL+D.
This commit is contained in:
parent
64d050769b
commit
f5ca270e75
@ -434,11 +434,11 @@ class QuestionHelper extends Helper
|
||||
$ret = readline();
|
||||
} else {
|
||||
$ret = fgets($stream, 4096);
|
||||
}
|
||||
|
||||
if (false === $ret) {
|
||||
throw new \RuntimeException('Aborted');
|
||||
}
|
||||
}
|
||||
|
||||
return trim($ret);
|
||||
}
|
||||
|
Reference in New Issue
Block a user