From 2ee8639eaf69f8ef7dd6e8c20ef7ddb0273cb43d Mon Sep 17 00:00:00 2001 From: Jeremy Price Date: Thu, 11 Jan 2024 18:18:41 -0800 Subject: [PATCH] Check to make sure there's a .env file While i was testing this, i noticed that it ran right by the .env check, even though i don't have a .env file at all. The script checks for a _bad_ .env, but not a missing one. Now it does --- upgrade.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/upgrade.php b/upgrade.php index 1da44c90b..7f9821114 100644 --- a/upgrade.php +++ b/upgrade.php @@ -55,6 +55,12 @@ echo "--------------------------------------------------------\n\n"; // Check the .env looks ok $env = file('.env'); +if (! $env){ + echo "\n!!!!!!!!!!!!!!!!!!!!!!!!!! .ENV FILE ERROR !!!!!!!!!!!!!!!!!!!!!!!!!!\n"; + echo "Your .env file doesn't seem to exist in this directory or isn't readable! Please look into that.\n"; + exit(1); +} + $env_good = ''; $env_bad = '';