|
@@ -1254,7 +1254,7 @@ class Worker
|
|
|
$STDOUT = \fopen(static::$stdoutFile, "a");
|
|
$STDOUT = \fopen(static::$stdoutFile, "a");
|
|
|
$STDERR = \fopen(static::$stdoutFile, "a");
|
|
$STDERR = \fopen(static::$stdoutFile, "a");
|
|
|
// Fix standard output cannot redirect of PHP 8.1.8's bug
|
|
// Fix standard output cannot redirect of PHP 8.1.8's bug
|
|
|
- if (\posix_isatty(2)) {
|
|
|
|
|
|
|
+ if (\function_exists('posix_isatty') && \posix_isatty(2)) {
|
|
|
\ob_start(function ($string) {
|
|
\ob_start(function ($string) {
|
|
|
\file_put_contents(static::$stdoutFile, $string, FILE_APPEND);
|
|
\file_put_contents(static::$stdoutFile, $string, FILE_APPEND);
|
|
|
}, 1);
|
|
}, 1);
|