8000 [Process] Avoid calling fclose on an already closed resource · symfony/process@96532c9 · GitHub
[go: up one dir, main page]

Skip to content

Commit 96532c9

Browse files
Seldaeknicolas-grekas
authored andcommitted
[Process] Avoid calling fclose on an already closed resource
1 parent f0521ab commit 96532c9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Pipes/AbstractPipes.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@ public function __construct($input)
4747
public function close()
4848
{
4949
foreach ($this->pipes as $pipe) {
50-
fclose($pipe);
50+
if (\is_resource($pipe)) {
51+
fclose($pipe);
52+
}
5153
}
5254
$this->pipes = [];
5355
}

0 commit comments

Comments
 (0)
0