From f0521ab90de76e74e227c63a6e73d3163aadaa8a Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sun, 2 Jan 2022 10:41:36 +0100 Subject: [PATCH 1/2] Bump license year --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index 9ff2d0d6..88bf75bb 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2021 Fabien Potencier +Copyright (c) 2004-2022 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal From 96532c9fc84be74d06c2728413006e6e76590e7a Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Fri, 21 Jan 2022 15:28:20 +0100 Subject: [PATCH 2/2] [Process] Avoid calling fclose on an already closed resource --- Pipes/AbstractPipes.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Pipes/AbstractPipes.php b/Pipes/AbstractPipes.php index b0654f13..ab65866c 100644 --- a/Pipes/AbstractPipes.php +++ b/Pipes/AbstractPipes.php @@ -47,7 +47,9 @@ public function __construct($input) public function close() { foreach ($this->pipes as $pipe) { - fclose($pipe); + if (\is_resource($pipe)) { + fclose($pipe); + } } $this->pipes = []; }