removed php_sapi_name() === 'cli' check that assumed development config

This commit is contained in:
Guillermo Dev
2018-12-04 01:09:13 +01:00
parent 762e6ace96
commit 9200cc757b

View File

@@ -71,7 +71,7 @@ class Configuration {
public static function getConfigFilePath() public static function getConfigFilePath()
{ {
if (null === self::$customConfigFilePath) { if (null === self::$customConfigFilePath) {
$envfile = (php_sapi_name() === 'cli' || apache_getenv('APPLICATION_ENV') === 'development') ? 'local' : 'global'; $envfile = apache_getenv('APPLICATION_ENV') === 'development' ? 'local' : 'global';
self::$customConfigFilePath = realpath(dirname(__FILE__) . "/../../../../../../config/configuration.$envfile.php"); self::$customConfigFilePath = realpath(dirname(__FILE__) . "/../../../../../../config/configuration.$envfile.php");
} }
return self::$customConfigFilePath; return self::$customConfigFilePath;