1
0
Fork 0
mirror of synced 2024-10-02 18:26:49 +13:00

Refactor usage init hook to remove unecessary

inject
This commit is contained in:
Bhaskar Singh 2023-04-27 19:32:05 +05:30
parent 3865f48d32
commit 7064f884aa

View file

@ -557,9 +557,8 @@ App::shutdown()
App::init() App::init()
->groups(['usage']) ->groups(['usage'])
->inject('utopia') ->action(function () {
->action(function (App $utopia) { if (App::getEnv('_APP_USAGE_STATS', 'enabled') != 'enabled') {
if ($utopia::getEnv('_APP_USAGE_STATS', 'enabled') != 'enabled') {
throw new Exception(Exception::GENERAL_USAGE_DISABLED); throw new Exception(Exception::GENERAL_USAGE_DISABLED);
} }
}); });