Commit
[Console] Change back to fgets() in DialogHelper
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,7 +20,7 @@ | |
*/ | ||
class DialogHelper extends Helper | ||
{ | ||
private $inputStream; | ||
private $inputStream = STDIN; | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
Seldaek
Member
|
||
|
||
/** | ||
* Asks a question to the user. | ||
|
@@ -35,7 +35,8 @@ public function ask(OutputInterface $output, $question, $default = null) | |
{ | ||
$output->write($question); | ||
|
||
if (false === $ret = stream_get_line(null === $this->inputStream ? STDIN : $this->inputStream, 4096, "\n")) { | ||
$ret = fgets($this->inputStream, 4096); | ||
if (false === $ret) { | ||
throw new \RuntimeException('Aborted'); | ||
} | ||
$ret = trim($ret); | ||
|
Since this commit, I get
Notice: Use of undefined constant STDIN - assumed 'STDIN'
everytime I try to use the console.