Skip to content

Commit

Permalink
Merge branch '6.5' into 7.2
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Jun 18, 2018
2 parents f224053 + d0dd8ce commit 3c50bbf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions src/Util/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -590,6 +590,8 @@ public function handlePHPConfiguration(): void
\putenv("{$name}={$value}");
}

$value = \getenv($name);

if (!isset($_ENV[$name])) {
$_ENV[$name] = $value;
}
Expand Down
6 changes: 3 additions & 3 deletions tests/Util/ConfigurationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -351,8 +351,8 @@ public function testPHPConfigurationIsHandledCorrectly(): void
$this->assertFalse(\FOO);
$this->assertTrue(\BAR);
$this->assertFalse($GLOBALS['foo']);
$this->assertTrue($_ENV['foo']);
$this->assertEquals('forced', \getenv('foo_force'));
$this->assertTrue((bool) $_ENV['foo']);
$this->assertEquals(1, \getenv('foo'));
$this->assertEquals('bar', $_POST['foo']);
$this->assertEquals('bar', $_GET['foo']);
$this->assertEquals('bar', $_COOKIE['foo']);
Expand Down Expand Up @@ -399,7 +399,7 @@ public function testHandlePHPConfigurationDoesNotOverriteVariablesFromPutEnv():
\putenv('foo=putenv');
$this->configuration->handlePHPConfiguration();

$this->assertTrue($_ENV['foo']);
$this->assertEquals('putenv', $_ENV['foo']);
$this->assertEquals('putenv', \getenv('foo'));
}

Expand Down

0 comments on commit 3c50bbf

Please sign in to comment.