1
0
mirror of https://github.com/danog/process.git synced 2024-11-26 12:14:43 +01:00

Fix further fclose errors with PHP 8 (#46)

This commit is contained in:
代码之美 2021-03-31 00:37:21 +08:00 committed by GitHub
parent b24f0ca94d
commit aa7eed2a04
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -216,12 +216,15 @@ final class Runner implements ProcessRunner
$handle->stdin->close();
$handle->stdout->close();
$handle->stderr->close();
foreach ($handle->sockets as $socket) {
@\fclose($socket);
if (\is_resource($socket)) {
@\fclose($socket);
}
}
@\fclose($handle->wrapperStderrPipe);
if (\is_resource($handle->wrapperStderrPipe)) {
@\fclose($handle->wrapperStderrPipe);
}
if (\is_resource($handle->proc)) {
\proc_close($handle->proc);