minor #37466 [Console] Do not check for "stty" using "exec" if that function is disabled (mvorisek)
This PR was squashed before being merged into the 3.4 branch.
Discussion
----------
[Console] Do not check for "stty" using "exec" if that function is disabled
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | no
| License | MIT
| Doc PR | no
fixes https://github.com/FriendsOfPHP/PHP-CS-Fixer/issues/5030
Commits
-------
02124b6b3b
[Console] Do not check for "stty" using "exec" if that function is disabled
This commit is contained in:
commit
9f6acd549c
@ -66,6 +66,11 @@ class Terminal
|
||||
return self::$stty;
|
||||
}
|
||||
|
||||
// skip check if exec function is disabled
|
||||
if (!\function_exists('exec')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
exec('stty 2>&1', $output, $exitcode);
|
||||
|
||||
return self::$stty = 0 === $exitcode;
|
||||
|
Reference in New Issue
Block a user