diff --git a/lib/Alchemy/Phrasea/Application/Api.php b/lib/Alchemy/Phrasea/Application/Api.php index 06160932b9..55c33d3cd3 100644 --- a/lib/Alchemy/Phrasea/Application/Api.php +++ b/lib/Alchemy/Phrasea/Application/Api.php @@ -66,4 +66,4 @@ return call_user_func(function ($environment = PhraseaApplication::ENV_PROD) { $app['dispatcher']->dispatch(PhraseaEvents::API_LOAD_END, new ApiLoadEndEvent()); return $app; -}, isset($environment) ? $environment : null); +}, isset($environment) ? $environment : PhraseaApplication::ENV_PROD); diff --git a/lib/Alchemy/Phrasea/Application/Root.php b/lib/Alchemy/Phrasea/Application/Root.php index 2a973fc148..e6470185d9 100644 --- a/lib/Alchemy/Phrasea/Application/Root.php +++ b/lib/Alchemy/Phrasea/Application/Root.php @@ -68,4 +68,4 @@ return call_user_func(function ($environment = PhraseaApplication::ENV_PROD) { ); return $app; -}, isset($environment) ? $environment : null); +}, isset($environment) ? $environment : PhraseaApplication::ENV_PROD); diff --git a/www/api.php b/www/api.php index 7033a9e1d7..7e76061a4d 100644 --- a/www/api.php +++ b/www/api.php @@ -9,12 +9,14 @@ * file that was distributed with this source code. */ +use Alchemy\Phrasea\Application; use Symfony\Component\Debug\ErrorHandler; require_once __DIR__ . '/../lib/autoload.php'; ErrorHandler::register(); +$environment = Application::ENV_PROD; $app = require __DIR__ . '/../lib/Alchemy/Phrasea/Application/Api.php'; $app->run(); diff --git a/www/index.php b/www/index.php index 924a601ef3..f7c746c5c8 100644 --- a/www/index.php +++ b/www/index.php @@ -9,13 +9,14 @@ * file that was distributed with this source code. */ +use Alchemy\Phrasea\Application; use Symfony\Component\Debug\ErrorHandler; require_once __DIR__ . "/../lib/autoload.php"; ErrorHandler::register(); -$environment = 'prod'; +$environment = Application::ENV_PROD; $app = require __DIR__ . '/../lib/Alchemy/Phrasea/Application/Root.php'; $app->run(); diff --git a/www/index_dev.php b/www/index_dev.php index 27ee07a78a..dc1472cf9a 100644 --- a/www/index_dev.php +++ b/www/index_dev.php @@ -9,13 +9,14 @@ * file that was distributed with this source code. */ +use Alchemy\Phrasea\Application; use Symfony\Component\Debug\ErrorHandler; require_once __DIR__ . "/../lib/autoload.php"; ErrorHandler::register(); -$environment = 'dev'; +$environment = Application::ENV_DEV; $app = require __DIR__ . '/../lib/Alchemy/Phrasea/Application/Root.php'; $app->run();