[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
This commit is contained in:
Oleg Pudeyev 2011-05-01 03:25:22 -04:00
parent 234b891a4b
commit 63ca4c2104

View file

@ -920,6 +920,9 @@ class phpbb_template_compile
@fclose($source_handle); @fclose($source_handle);
rewind($destination_handle); rewind($destination_handle);
return stream_get_contents($destination_handle); $contents = stream_get_contents($destination_handle);
@fclose($dest_handle);
return $contents;
} }
} }