Moving $_ENV['KOHANA_ENV'] check above Kohana::init() call. Refs #3254

This commit is contained in:
Kiall Mac Innes 2010-09-20 23:28:44 +01:00
parent 5686a636da
commit c323779dcb

View file

@ -36,6 +36,15 @@ ini_set('unserialize_callback_func', 'spl_autoload_call');
//-- Configuration and initialization -----------------------------------------
/**
* Set Kohana::$environment if $_ENV['KOHANA_ENV'] has been supplied.
*
*/
if (isset($_ENV['KOHANA_ENV']))
{
Kohana::$environment = $_ENV['KOHANA_ENV'];
}
/**
* Initialize Kohana, setting the default options.
*
@ -53,15 +62,6 @@ Kohana::init(array(
'base_url' => '/',
));
/**
* Set Kohana::$environment if $_ENV['KOHANA_ENV'] has been supplied.
*
*/
if (isset($_ENV['KOHANA_ENV']))
{
Kohana::$environment = $_ENV['KOHANA_ENV'];
}
/**
* Attach the file write to logging. Multiple writers are supported.
*/