Skip to content

Commit

Permalink
merged branch norzechowicz/posix_isatty (PR #8939)
Browse files Browse the repository at this point in the history
This PR was submitted for the master branch but it was merged into the 2.2 branch instead (closes #8939).

Discussion
----------

[Console] Ignore posix_istatty warnings

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| License       | MIT

When input stream is ``php://memory`` or ``php://temp`` function ``posix_isatty`` throws following warning

> posix_isatty(): could not use stream of type 'MEMORY' in ....

Commits
-------

cc255dd Ignore posix_istatty warnings
  • Loading branch information
fabpot committed Sep 5, 2013
2 parents aee9799 + 4e9d990 commit abb8042
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Symfony/Component/Console/Application.php
Expand Up @@ -171,7 +171,7 @@ public function doRun(InputInterface $input, OutputInterface $output)

if (function_exists('posix_isatty') && $this->getHelperSet()->has('dialog')) {
$inputStream = $this->getHelperSet()->get('dialog')->getInputStream();
if (!posix_isatty($inputStream)) {
if (!@posix_isatty($inputStream)) {
$input->setInteractive(false);
}
}
Expand Down

0 comments on commit abb8042

Please sign in to comment.