Skip to content

Commit d86678b

Browse files
committed
[Console] Allow checking for OS400 platform when php_uname() disabled
1 parent 5130ff7 commit d86678b

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

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

+7-1
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_uname('s');
128+
$checks = array(
129+
function_exists('php_uname') ? php_uname('s') : '',
130+
getenv('OSTYPE'),
131+
defined('PHP_OS') ? PHP_OS : '',
132+
);
133+
134+
return (bool) stristr(implode(';', $checks), 'OS400');
129135
}
130136

131137
/**

0 commit comments

Comments
 (0)