Skip to content

Commit 66212b1

Browse files
authored
Treat empty env variables has undefined (#1586)
1 parent 9e77a1c commit 66212b1

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/Core/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66

77
- Allow passing explicit null values for optional fields of input objects
88

9+
### Fixed
10+
11+
- Treat empty env variable as undefined
12+
913
## 1.20.0
1014

1115
### Added

src/Core/src/Configuration.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,8 @@ private static function parseEnvironmentVariables(array $options): array
195195
// Read environment files
196196
$envVariableNames = (array) $envVariableNames;
197197
foreach ($envVariableNames as $envVariableName) {
198-
if (null !== $envVariableValue = EnvVar::get($envVariableName)) {
198+
$envVariableValue = EnvVar::get($envVariableName);
199+
if (null !== $envVariableValue && '' !== $envVariableValue) {
199200
$options[$option] = $envVariableValue;
200201

201202
break;

0 commit comments

Comments
 (0)