Skip to content

Commit

Permalink
[Console] Handle false return value from readline
Browse files Browse the repository at this point in the history
"readline()" returns "false" when the user presses CTRL+D.
  • Loading branch information
Michaël Perrin committed Aug 4, 2015
1 parent 64d0507 commit f5ca270
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Symfony/Component/Console/Helper/QuestionHelper.php
Expand Up @@ -434,10 +434,10 @@ private function readFromInput($stream)
$ret = readline();
} else {
$ret = fgets($stream, 4096);
}

if (false === $ret) {
throw new \RuntimeException('Aborted');
}
if (false === $ret) {
throw new \RuntimeException('Aborted');
}

return trim($ret);
Expand Down

0 comments on commit f5ca270

Please sign in to comment.