Skip to content

Commit 664362c

Browse files
committed
Fix empty config when initializing Logger
1 parent 9ac14d2 commit 664362c

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/main.php

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,17 @@ function main() {
4141

4242
date_default_timezone_set('UTC');
4343

44-
// This must come after GlobalErrorHandler::createOverrides() because this
45-
// will call Rollbar::init() which will create its own error handlers for
46-
// Application Performance Monitoring (APM) purposes.
47-
Logger::initialize();
48-
4944
Common::$config = json_decode(file_get_contents(
5045
__DIR__ . "/../etc/config.phoenix.json"
5146
));
5247

48+
// This must come after GlobalErrorHandler::createOverrides() because this
49+
// will call Rollbar::init() which will create its own error handlers for
50+
// Application Performance Monitoring (APM) purposes. This must also come
51+
// after assignment of Common::$config because we need the access token for
52+
// Rollbar which is present in the config file only.
53+
Logger::initialize();
54+
5355
Session::initialize(
5456
Common::$config->memcache->session_server_string, 'sid'
5557
);

0 commit comments

Comments
 (0)