Skip to content

Commit 7ec665c

Browse files
committed
Use lang.Environment::variables()
1 parent dd08c35 commit 7ec665c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/php/com/amazon/aws/lambda/Environment.class.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
use io\Path;
44
use io\streams\StringWriter;
5-
use lang\ElementNotFoundException;
5+
use lang\{ElementNotFoundException, Environment as System};
66
use util\cmd\Console;
77
use util\{FilesystemPropertySource, PropertyAccess};
88

@@ -17,7 +17,7 @@ class Environment {
1717
/** Creates a new environment */
1818
public function __construct(string $root, StringWriter $writer= null, array $variables= null) {
1919
$this->root= $root;
20-
$this->variables= $variables ?? (PHP_VERSION_ID >= 70100 ? getenv() : $_SERVER);
20+
$this->variables= $variables ?? System::variables();
2121
$this->writer= $writer ?? Console::$out;
2222
$this->properties= new FilesystemPropertySource($root);
2323
}

0 commit comments

Comments
 (0)