diff --git a/src/App.php b/src/App.php index 7a89a6c..4c57f67 100644 --- a/src/App.php +++ b/src/App.php @@ -67,16 +67,6 @@ class App { $sentry_transaction = new SentryTransaction(); $sentry_span = new SentrySpan('app.init', 'Application initialization'); - // Define upload_tmp_dir - if (self::isset('upload_tmp_directory')) - Config :: ini_set('upload_tmp_dir', self::get('upload_tmp_directory', null, 'string')); - if (self::isset('upload_max_filesize')) { - Config :: ini_set('upload_max_filesize', self::get('upload_max_filesize', null, 'string')); - // post_max_size must be larger than upload_max_filesize - // See: https://www.php.net/manual/en/ini.core.php#ini.post-max-size - Config :: ini_set('post_max_size', strval(self::get('upload_max_filesize', null, 'int') * 1.1)); - } - if (self :: get('log.enabled', null, 'bool')) Log::init(); if (self :: get('session.enabled', null, 'bool')) @@ -97,6 +87,17 @@ class App { I18n::init(); if (self :: get('cli.enabled', null, 'bool')) Cli::init(); + + // Define common upload_tmp_dir & upload_max_filesize PHP ini + if (self::isset('upload_tmp_directory')) + Config :: ini_set('upload_tmp_dir', self::get('upload_tmp_directory', null, 'string')); + if (self::isset('upload_max_filesize')) { + Config :: ini_set('upload_max_filesize', self::get('upload_max_filesize', null, 'string')); + // post_max_size must be larger than upload_max_filesize + // See: https://www.php.net/manual/en/ini.core.php#ini.post-max-size + Config :: ini_set('post_max_size', strval(self::get('upload_max_filesize', null, 'int') * 1.1)); + } + $sentry_span->finish(); }