Skip to content

Commit

Permalink
fixed #352 - getenv is discouraged.
Browse files Browse the repository at this point in the history
  • Loading branch information
lesstif committed Oct 8, 2020
1 parent f4d872d commit faac4b5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Configuration/DotEnvConfiguration.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public function __construct($path = '.')
*/
private function env($key, $default = null)
{
$value = getenv($key);
$value = $_ENV[$key] ?? null ;

if ($value === false) {
return $default;
Expand All @@ -74,7 +74,7 @@ private function env($key, $default = null)

case 'null':
case '(null)':
return;
return null;
}

if ($this->startsWith($value, '"') && $this->endsWith($value, '"')) {
Expand Down

0 comments on commit faac4b5

Please sign in to comment.