Skip to content

Commit

Permalink
Merge pull request #7 from b13/issue-6
Browse files Browse the repository at this point in the history
[BUGFIX] Prevent TypeError on passing env var
  • Loading branch information
bmack authored Oct 28, 2022
2 parents 2bea9d5 + 79d8d2d commit 0d41f31
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
/var/
/vendor/
/.php-cs-fixer.cache
/.idea
9 changes: 7 additions & 2 deletions src/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,13 @@ public function useDDEVConfiguration(string $dbHost = null): self
'user' => 'db',
]
)
->useImageMagick()
->useMailhog(getenv('MH_SMTP_BIND_ADDR'));
->useImageMagick();

$mailhogSmtpBindAddr = getenv('MH_SMTP_BIND_ADDR');
if (is_string($mailhogSmtpBindAddr) && $mailhogSmtpBindAddr !== '') {
$this->useMailhog($mailhogSmtpBindAddr);
}

return $this;
}

Expand Down

0 comments on commit 0d41f31

Please sign in to comment.