when code is run from cli apache_getenv does not work, but it usually means it is dev env

master
Guillermo Dev 7 years ago
parent 21f1e77556
commit bdf897fed5

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

Loading…
Cancel
Save