10000 minor #37466 [Console] Do not check for "stty" using "exec" if that f… · symfony/symfony@9f6acd5 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9f6acd5

Browse files
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 PHP-CS-Fixer/PHP-CS-Fixer#5030 Commits ------- 02124b6 [Console] Do not check for "stty" using "exec" if that function is disabled
2 parents 91f30e0 + 02124b6 commit 9f6acd5

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Symfony/Component/Console/Terminal.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,11 @@ public static function hasSttyAvailable()
6666
return self::$stty;
6767
}
6868

69+
// skip check if exec function is disabled
70+
if (!\function_exists('exec')) {
71+
return false;
72+
}
73+
6974
exec('stty 2>&1', $output, $exitcode);
7075

7176
return self::$stty = 0 === $exitcode;

0 commit comments

Comments
 (0)
0