From 3d79c904e3e18c590efb649e8280921c47ebe61a Mon Sep 17 00:00:00 2001 From: Daniel Love Date: Mon, 14 Mar 2022 14:44:28 -0600 Subject: [PATCH] Fixing missing SHIELD var issue in Dotenv::getSettings method. --- src/Dotenv.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Dotenv.php b/src/Dotenv.php index 7199ffb..042f8f4 100644 --- a/src/Dotenv.php +++ b/src/Dotenv.php @@ -173,16 +173,16 @@ public function getConfig(): array if ($config['shield.settings']['shield_enable']) { if (isset($_SERVER['SHIELD_USERNAME'])) { $config['shield.settings']['credentials']['shield']['user'] = $_SERVER['SHIELD_USERNAME']; - } - else { + } elseif (isset($_SERVER['SHIELD'])) { $config['shield.settings']['credentials']['shield']['user'] = $_SERVER['SHIELD']; } + if (isset($_SERVER['SHIELD_PASSWORD'])) { $config['shield.settings']['credentials']['shield']['pass'] = $_SERVER['SHIELD_PASSWORD']; - } - else { + } elseif (isset($_SERVER['SHIELD'])) { $config['shield.settings']['credentials']['shield']['pass'] = $_SERVER['SHIELD']; } + if (isset($_SERVER['SHIELD_MESSAGE'])) { $config['shield.settings']['print'] = $_SERVER['SHIELD_MESSAGE']; }