Skip to content

Commit

Permalink
returns empty string if envPrefix+SMTP_HOST is requested via ->getValue.
Browse files Browse the repository at this point in the history
Closes #17
  • Loading branch information
gilzow committed Sep 14, 2023
1 parent 09982f2 commit 645133e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -508,6 +508,14 @@ public function hasRelationship(string $relationship) : bool
protected function getValue(string $name) : ?string
{
$checkName = $this->envPrefix . strtoupper($name);
/*
* If enable_smtp is to `false` for the project, then the envPrefix.SMTP_HOST environmental variable is not
* included in the environment. Therefore, if the environmental variable isn't set, return an empty string, not
* a null
*/
if('SMTP_HOST' === $name) {
return $this->environmentVariables[$checkName] ?? "";
}
return $this->environmentVariables[$checkName] ?? null;
}

Expand Down

0 comments on commit 645133e

Please sign in to comment.