Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

returns empty string if envPrefix+SMTP_HOST is requested via ->getValue. #26

Merged
merged 1 commit into from
Sep 14, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading