Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 96a4071

Browse files
johnkaryfabpot
authored andcommitted
[Console] Add additional ways to detect OS400 platform
1 parent 513fc31 commit 96a4071

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/Symfony/Component/Console/Output/ConsoleOutput.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,13 @@ protected function hasStderrSupport()
125125
*/
126126
private function isRunningOS400()
127127
{
128-
return 'OS400' === PHP_OS;
128+
$checks = array(
129+
function_exists('php_uname') ? php_uname('s') : '',
130+
getenv('OSTYPE'),
131+
PHP_OS,
132+
);
133+
134+
return false !== stristr(implode(';', $checks), 'OS400');
129135
}
130136

131137
/**

0 commit comments

Comments
 (0)