From 6c0a2eaefc385f2776224f73e07238c10aa81c33 Mon Sep 17 00:00:00 2001 From: Art4 Date: Wed, 22 Jan 2025 12:36:14 +0000 Subject: [PATCH] Inject config into App::loadDefaultTimezone() via parameter --- src/App.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/App.php b/src/App.php index af8c391426..41ae4fd1b7 100644 --- a/src/App.php +++ b/src/App.php @@ -308,7 +308,7 @@ class App $viewDefinition->load(true); } - $this->loadDefaultTimezone(); + $this->loadDefaultTimezone($config); } /** @@ -318,10 +318,10 @@ class App * * @global string $default_timezone */ - private function loadDefaultTimezone() + private function loadDefaultTimezone(IManageConfigValues $config) { - if ($this->config->get('system', 'default_timezone')) { - $timezone = $this->config->get('system', 'default_timezone', 'UTC'); + if ($config->get('system', 'default_timezone')) { + $timezone = $config->get('system', 'default_timezone', 'UTC'); } else { global $default_timezone; $timezone = $default_timezone ?? '' ?: 'UTC';