Skip to content

Commit a9e43a7

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

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Symfony/Component/Process/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)