From 7254a4ae507dc85b36f515e98deafc348c2fc0d0 Mon Sep 17 00:00:00 2001 From: ghost Date: Wed, 13 Sep 2023 18:52:54 +0300 Subject: [PATCH] fix example file path, add existion check on config init --- src/config/bootstrap.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config/bootstrap.php b/src/config/bootstrap.php index aa52f28..ebdad3a 100644 --- a/src/config/bootstrap.php +++ b/src/config/bootstrap.php @@ -16,7 +16,7 @@ if (!in_array($_SERVER['PHP_ENV'], ['default', 'mirror', 'dev', 'test', 'prod']) } // Generate configuration file if not exists -if (!file_exists(__DIR__ . '/../../env.' . $_SERVER['PHP_ENV'] . '.php')) +if (!file_exists(__DIR__ . '/env.' . $_SERVER['PHP_ENV'] . '.php') && file_exists(__DIR__ . '/../../example/environment/env.example.php')) { if (copy(__DIR__ . '/../../example/environment/env.example.php', __DIR__ . '/env.' . $_SERVER['PHP_ENV'] . '.php')) {