1
0
Fork 0
mirror of synced 2025-04-07 07:13:32 +03:00

make .env optional

This commit is contained in:
Pavel 2020-09-29 16:44:13 +03:00
parent fbfca80dec
commit 3d5a4daab3

View file

@ -8,5 +8,8 @@ if (function_exists('date_default_timezone_set')
$loader = include dirname(__DIR__) . '/vendor/autoload.php';
$loader->add('RetailCrm\\Test', __DIR__);
$dotenv = Dotenv\Dotenv::createImmutable(__DIR__ . '/..');
$dotenv->load();
if (file_exists(__DIR__ . '/../.env')) {
$dotenv = Dotenv\Dotenv::createImmutable(__DIR__ . '/..');
$dotenv->load();
}