From 3a29410fdda3f128de33573ff76af3225fbea2f7 Mon Sep 17 00:00:00 2001 From: Ying Date: Wed, 26 Apr 2023 10:36:10 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E5=88=9D=E5=A7=8B=E5=8C=96=E6=A3=80?= =?UTF-8?q?=E6=B5=8B.env?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- support/helpers.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/support/helpers.php b/support/helpers.php index e9ce52c..3c47c5f 100644 --- a/support/helpers.php +++ b/support/helpers.php @@ -137,7 +137,10 @@ if (!function_exists('get_env')) { { $dir = str_replace('\\', '/', realpath(__DIR__ . '/../')); $env_path = $dir . '/.env'; - $env_info = parse_ini_file($env_path, true); + $env_info = []; + if (is_file($env_path)) { + $env_info = parse_ini_file($env_path, true); + } return $env_info[$var] ?? ''; } }