Skip to content

Commit

Permalink
CBF.
Browse files Browse the repository at this point in the history
  • Loading branch information
grasmash committed May 10, 2022
1 parent 1a1b2b0 commit bb1c1a2
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/Expander.php
Original file line number Diff line number Diff line change
Expand Up @@ -277,12 +277,11 @@ public function expandProperty(string $property_name, string $unexpanded_value,
if (str_starts_with($property_name, "env.") &&
!$data->has($property_name)) {
$env_key = substr($property_name, 4);
if (isset($_SERVER[$env_key])) {
$data->set($property_name, $_SERVER[$env_key]);
}
elseif (getenv($env_key)) {
$data->set($property_name, getenv($env_key));
}
if (isset($_SERVER[$env_key])) {
$data->set($property_name, $_SERVER[$env_key]);
} elseif (getenv($env_key)) {
$data->set($property_name, getenv($env_key));
}
}

if (!$data->has($property_name)) {
Expand Down

0 comments on commit bb1c1a2

Please sign in to comment.