Catch database errors, set fallback tz
The fallback timezone is set in case an error occurs before setupTimezone() is entered. In this case the user is presented with an warning about missing timezone settings if the php.ini doesn't contain timezone information refs #4529
This commit is contained in:
parent
95bc8a2f4f
commit
c9673bfea3
|
@ -308,13 +308,14 @@ class Web extends ApplicationBootstrap
|
|||
try {
|
||||
$initialPreferences = $preferenceStore->load();
|
||||
} catch (Exception $e) {
|
||||
Logger::fatal(
|
||||
Logger::warn(
|
||||
'%s::%s: Could not load preferences from provider. '
|
||||
. 'An exception during bootstrap was thrown: %s',
|
||||
__CLASS__,
|
||||
__FUNCTION__,
|
||||
$e->getMessage()
|
||||
);
|
||||
$this->registerFallbackPreferenceProvider($preferences, $user);
|
||||
}
|
||||
|
||||
$sessionStore->writeAll($initialPreferences);
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
// {{{ICINGA_LICENSE_HEADER}}}
|
||||
// {{{ICINGA_LICENSE_HEADER}}}
|
||||
|
||||
date_default_timezone_set('UTC');
|
||||
require_once dirname(__FILE__). '/../library/Icinga/Application/ApplicationBootstrap.php';
|
||||
require_once dirname(__FILE__). '/../library/Icinga/Application/Web.php';
|
||||
|
||||
|
|
Loading…
Reference in New Issue