File tree 2 files changed +3
-1
lines changed
src/Symfony/Component/Dotenv 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -351,7 +351,7 @@ private function resolveVariables($value)
351
351
}
352
352
353
353
$ name = $ matches [3 ];
354
- $ value = isset ($ this ->values [$ name ]) ? $ this ->values [$ name ] : (isset ($ _ENV [$ name ]) ? isset ( $ _ENV [$ name ]) : (string ) getenv ($ name ));
354
+ $ value = isset ($ this ->values [$ name ]) ? $ this ->values [$ name ] : (isset ($ _ENV [$ name ]) ? $ _ENV [$ name ] : (string ) getenv ($ name ));
355
355
356
356
if (!$ matches [2 ] && isset ($ matches [4 ])) {
357
357
$ value .= '} ' ;
Original file line number Diff line number Diff line change @@ -63,6 +63,7 @@ public function testParse($data, $expected)
63
63
public function getEnvData ()
64
64
{
65
65
putenv ('LOCAL=local ' );
66
+ $ _ENV ['REMOTE ' ] = 'remote ' ;
66
67
67
68
$ tests = array (
68
69
// spaces
@@ -134,6 +135,7 @@ public function getEnvData()
134
135
array ('FOO=" \\$ " ' , array ('FOO ' => ' $ ' )),
135
136
array ('FOO=" $ " ' , array ('FOO ' => ' $ ' )),
136
137
array ('BAR=$LOCAL ' , array ('BAR ' => 'local ' )),
138
+ array ('BAR=$REMOTE ' , array ('BAR ' => 'remote ' )),
137
139
array ('FOO=$NOTDEFINED ' , array ('FOO ' => '' )),
138
140
);
139
141
You can’t perform that action at this time.
0 commit comments