Skip to content

Commit 8e19861

Browse files
committed
fix(backend): config variable missing in non-debug mode
1 parent 34f0c52 commit 8e19861

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

index.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040

4141
/* get configuration */
4242
$config = new Hm_Site_Config_File();
43+
4344
/* set default TZ */
4445
date_default_timezone_set($config->get('default_setting_timezone', 'UTC'));
4546
/* set the default since and per_source values */
@@ -53,6 +54,10 @@
5354
/* process the request */
5455
new Hm_Dispatch($config);
5556

57+
if (is_null($config)) {
58+
$config = new Hm_Site_Config_File();
59+
}
60+
5661
/* log some debug stats about the page */
5762
if (DEBUG_MODE or $config->get('debug_log')) {
5863
Hm_Debug::load_page_stats();

0 commit comments

Comments
 (0)