Fixes #3657 - Environments and KOHANA_ENV

Conflicts:

	application/bootstrap.php
This commit is contained in:
Kiall Mac Innes 2011-02-10 20:18:19 +00:00
parent aae5eaecbb
commit 6ec2e85553

View file

@ -61,9 +61,9 @@ I18n::lang('en-us');
* Note: If you supply an invalid environment name, a PHP warning will be thrown
* saying "Couldn't find constant Kohana::<INVALID_ENV_NAME>"
*/
if (getenv('KOHANA_ENV') !== FALSE)
if (isset($_SERVER['KOHANA_ENV']))
{
Kohana::$environment = constant('Kohana::'.strtoupper(getenv('KOHANA_ENV')));
Kohana::$environment = constant('Kohana::'.strtoupper($_SERVER['KOHANA_ENV']));
}
/**