-- fix use of STDIN

This commit is contained in:
Michel Salib 2011-08-01 02:02:37 +02:00
parent 5b5dc45f79
commit 1087792f7e

View File

@ -20,7 +20,7 @@ use Symfony\Component\Console\Output\OutputInterface;
*/
class DialogHelper extends Helper
{
private $inputStream = STDIN;
private $inputStream;
/**
* Asks a question to the user.
@ -35,7 +35,7 @@ class DialogHelper extends Helper
{
$output->write($question);
$ret = fgets($this->inputStream, 4096);
$ret = fgets($this->inputStream ?: STDIN, 4096);
if (false === $ret) {
throw new \RuntimeException('Aborted');
}