diff options
| author | Oleg Pudeyev <oleg@bsdpower.com> | 2011-05-01 03:25:22 -0400 |
|---|---|---|
| committer | Oleg Pudeyev <oleg@bsdpower.com> | 2011-05-01 03:25:22 -0400 |
| commit | 63ca4c2104e7c61b6f2238b13bd5428b579be9e7 (patch) | |
| tree | 9c3bd1807364d3014808095c95a6dfe6b41cf4db /phpBB/includes | |
| parent | 234b891a4be11dc0f20d93dd272242ad20344aa0 (diff) | |
| download | forums-63ca4c2104e7c61b6f2238b13bd5428b579be9e7.tar forums-63ca4c2104e7c61b6f2238b13bd5428b579be9e7.tar.gz forums-63ca4c2104e7c61b6f2238b13bd5428b579be9e7.tar.bz2 forums-63ca4c2104e7c61b6f2238b13bd5428b579be9e7.tar.xz forums-63ca4c2104e7c61b6f2238b13bd5428b579be9e7.zip | |
[feature/template-engine] Close output stream in compile().
There is no need to leave the stream to the garbage collector,
and the amount of data stuck in it may be substantial.
PHPBB3-9726
Diffstat (limited to 'phpBB/includes')
| -rw-r--r-- | phpBB/includes/template_compile.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/phpBB/includes/template_compile.php b/phpBB/includes/template_compile.php index 3f8a028e25..e2bb9fd869 100644 --- a/phpBB/includes/template_compile.php +++ b/phpBB/includes/template_compile.php @@ -920,6 +920,9 @@ class phpbb_template_compile @fclose($source_handle); rewind($destination_handle); - return stream_get_contents($destination_handle); + $contents = stream_get_contents($destination_handle); + @fclose($dest_handle); + + return $contents; } } |
