From 4b378b5f390c0ea9e521434b239184233245be22 Mon Sep 17 00:00:00 2001 From: Peter Halverson Date: Sat, 16 Dec 2017 15:27:20 -0700 Subject: [PATCH] Check if ENVIRONMENT is defined Fixes #2 --- system/dotenv/Dotenv.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/dotenv/Dotenv.php b/system/dotenv/Dotenv.php index d4fa193..a38a4cc 100644 --- a/system/dotenv/Dotenv.php +++ b/system/dotenv/Dotenv.php @@ -25,7 +25,7 @@ class Dotenv public function __construct($path, $file = '.env') { - if ($file == '.env') { + if ($file == '.env' && defined(ENVIRONMENT)) { $file = '.env.' . strtolower(ENVIRONMENT); } $this->filePath = $this->getFilePath($path, $file);