bug #26211 [Console] Suppress warning from sapi_windows_vt100_support (adawolfa)

This PR was merged into the 2.7 branch.

Discussion
----------

[Console] Suppress warning from sapi_windows_vt100_support

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #26210
| License       | MIT

Suppresses warning from `sapi_windows_vt100_support()` for non-STDIO streams, e. g. `php://memory`.

Commits
-------

43f9421 Suppress warning from sapi_windows_vt100_support on stream other than STDIO
This commit is contained in:
Robin Chalas 2018-02-18 14:09:52 +01:00
commit 745300b1e8
1 changed files with 1 additions and 1 deletions

View File

@ -90,7 +90,7 @@ class StreamOutput extends Output
{
if (DIRECTORY_SEPARATOR === '\\') {
return
function_exists('sapi_windows_vt100_support') && sapi_windows_vt100_support($this->stream)
function_exists('sapi_windows_vt100_support') && @sapi_windows_vt100_support($this->stream)
|| '10.0.10586' === PHP_WINDOWS_VERSION_MAJOR.'.'.PHP_WINDOWS_VERSION_MINOR.'.'.PHP_WINDOWS_VERSION_BUILD
|| false !== getenv('ANSICON')
|| 'ON' === getenv('ConEmuANSI')