diff options
-rw-r--r-- | src/HTML5.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/HTML5.php b/src/HTML5.php index 6316e43..94faa1e 100644 --- a/src/HTML5.php +++ b/src/HTML5.php @@ -234,6 +234,10 @@ class HTML5 $stream = fopen('php://temp', 'wb'); $this->save($dom, $stream, array_merge($this->defaultOptions, $options)); - return stream_get_contents($stream, -1, 0); + $html = stream_get_contents($stream, -1, 0); + + fclose($stream); + + return $html; } } |