Check for empty strings

This commit is contained in:
Greyscale 2024-02-07 22:06:43 +01:00
parent 3d1da3bbd4
commit 70b5b1b8ed
No known key found for this signature in database
GPG key ID: 74BAFF55434DA4B2

View file

@ -327,6 +327,10 @@ class Bouncer
public function parseContainerEnvironmentVariables(array $envs, Target $bouncerTarget): Target
{
foreach ($envs as $eKey => $eVal) {
if(empty($eVal)){
$this->logger->warning("{key} set for {target} is empty, skipping.", ['key' => $eKey, 'emoji' => Emoji::warning(), 'target' => $bouncerTarget->getName()]);
continue;
}
switch ($eKey) {
case 'BOUNCER_LABEL':
$bouncerTarget->setLabel($eVal);