From ddde0834d0de7e05c244690bc9603e31cb46980e Mon Sep 17 00:00:00 2001 From: Benjamin Calef Date: Mon, 12 Feb 2024 13:23:39 +0100 Subject: [PATCH] [v2.0.3] make sure src file exist before copying it --- MagentoDotenv.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/MagentoDotenv.php b/MagentoDotenv.php index b05dc65..ca73049 100644 --- a/MagentoDotenv.php +++ b/MagentoDotenv.php @@ -40,7 +40,9 @@ public static function init(): void return; } else { $dotenvSrc = ROOT_DIRECTORY . self::SRC_APP_ETC_DOTENV_FILE; - copy($dotenvSrc, $dotenvDest); + if (is_file($dotenvSrc)) { + copy($dotenvSrc, $dotenvDest); + } } $magentoBootstrapFile = ROOT_DIRECTORY . self::MAGENTO_BOOTSTRAP_FILE;