Skip to content

Commit c8369ed

Browse files
committed
fix TypeError for php8
1 parent 53c756a commit c8369ed

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Worker.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1250,8 +1250,12 @@ public static function resetStd()
12501250
if ($handle) {
12511251
unset($handle);
12521252
\set_error_handler(function(){});
1253-
\fclose($STDOUT);
1254-
\fclose($STDERR);
1253+
if ($STDOUT) {
1254+
\fclose($STDOUT);
1255+
}
1256+
if ($STDERR) {
1257+
\fclose($STDERR);
1258+
}
12551259
\fclose(\STDOUT);
12561260
\fclose(\STDERR);
12571261
$STDOUT = \fopen(static::$stdoutFile, "a");

0 commit comments

Comments
 (0)