Skip to content
This repository was archived by the owner on May 27, 2022. It is now read-only.

Commit 0e06b2a

Browse files
committed
Always close streams opened internally
1 parent 33a74bb commit 0e06b2a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/AbstractProxyAdapter.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,11 @@ final public function write(string $path, string $contents, Config $config): voi
4747
*/
4848
final public function read(string $path): string
4949
{
50-
return stream_get_contents($this->readStream($path));
50+
$stream = $this->readStream($path);
51+
$contents = stream_get_contents($this->readStream($path));
52+
fclose($stream);
53+
54+
return $contents;
5155
}
5256

5357
/**

0 commit comments

Comments
 (0)