diff --git a/src/Knp/Snappy/AbstractGenerator.php b/src/Knp/Snappy/AbstractGenerator.php index 19d4e0d3..92b5c935 100644 --- a/src/Knp/Snappy/AbstractGenerator.php +++ b/src/Knp/Snappy/AbstractGenerator.php @@ -43,7 +43,7 @@ public function __construct($binary, array $options = array(), array $env = null $this->setBinary($binary); $this->setOptions($options); - $this->env = $env; + $this->env = empty($env) ? null : $env; } public function __destruct() @@ -361,7 +361,7 @@ protected function createTemporaryFile($content = null, $extension = null) if (null !== $content) { file_put_contents($filename, $content); } - + $this->temporaryFiles[] = $filename; return $filename;