Skip to content

Commit faac4b5

Browse files
committed
fixed #352 - getenv is discouraged.
1 parent f4d872d commit faac4b5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Configuration/DotEnvConfiguration.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public function __construct($path = '.')
5353
*/
5454
private function env($key, $default = null)
5555
{
56-
$value = getenv($key);
56+
$value = $_ENV[$key] ?? null ;
5757

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

7575
case 'null':
7676
case '(null)':
77-
return;
77+
return null;
7878
}
7979

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

0 commit comments

Comments
 (0)