merged branch norzechowicz/posix_isatty (PR #8939)

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
This commit is contained in:
Fabien Potencier 2013-09-05 15:35:47 +02:00
commit abb8042249
1 changed files with 1 additions and 1 deletions

View File

@ -171,7 +171,7 @@ class Application
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);
}
}