Skip to content

Commit 5e980f9

Browse files
mvoriseknicolas-grekas
authored andcommitted
[Console] Do not check for "stty" using "exec" if that function is disabled
1 parent cbbaa74 commit 5e980f9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

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)