From 642966977b7faef3d45710a48df2c10be0729a91 Mon Sep 17 00:00:00 2001 From: noelamaya Date: Wed, 28 Apr 2021 11:11:18 +0200 Subject: [PATCH] Change getenv() for $_SERVER['APP_ENV'] --- src/Sifo/Config.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Sifo/Config.php b/src/Sifo/Config.php index 7890f739..a0f98f9e 100644 --- a/src/Sifo/Config.php +++ b/src/Sifo/Config.php @@ -78,7 +78,7 @@ protected function __construct( $instance_name ) include( $this->config_path . $this->configuration_files ); $this->paths_to_configs = $config; - $env_file = getenv('APP_ENV') === 'test' ? '.env.test' : '.env'; + $env_file = (isset($_SERVER['APP_ENV']) && $_SERVER['APP_ENV'] === 'test') ? '.env.test' : '.env'; $dotenv = new Dotenv(); try {