From d685a6fdc23279329cb5d08481bab1f90b292a24 Mon Sep 17 00:00:00 2001 From: zyimm Date: Mon, 27 Jun 2022 11:07:12 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Listener/MultiEnvListener.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Listener/MultiEnvListener.php b/src/Listener/MultiEnvListener.php index ef9edff..ffa76fe 100644 --- a/src/Listener/MultiEnvListener.php +++ b/src/Listener/MultiEnvListener.php @@ -35,7 +35,7 @@ class MultiEnvListener implements ListenerInterface { $env = env('APP_ENV'); $env_path = BASE_PATH.'/.env.'.$env; - if ($event instanceof BootApplication && $env !== null) { + if ($env !== null && $event instanceof BootApplication) { if (file_exists($env_path) && ApplicationContext::hasContainer()) { (ApplicationContext::getContainer())->get(Config::class); }