Skip to content

Commit

Permalink
Merge pull request #143 from craue/fix-empty-env-argument
Browse files Browse the repository at this point in the history
fixed that passing an empty array as env argument would clean default environment variables within the forked process
  • Loading branch information
cursedcoder committed May 7, 2015
2 parents 904df09 + 145c8b5 commit f29edc4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Knp/Snappy/AbstractGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -361,7 +361,7 @@ protected function createTemporaryFile($content = null, $extension = null)
if (null !== $content) {
file_put_contents($filename, $content);
}

$this->temporaryFiles[] = $filename;

return $filename;
Expand Down

0 comments on commit f29edc4

Please sign in to comment.