1
0
mirror of https://github.com/flextype/flextype.git synced 2025-08-08 06:06:45 +02:00

fix(bootstrap): fix issue with invalid timezone setting #490

This commit is contained in:
Awilum
2020-12-09 12:19:15 +03:00
parent daebd59c4f
commit c1e6a3f274

View File

@@ -17,6 +17,7 @@ use Whoops\Handler\JsonResponseHandler;
use Whoops\Handler\PrettyPageHandler;
use Whoops\Run;
use Whoops\Util\Misc;
use DateTimeZone;
use function date_default_timezone_set;
use function error_reporting;
@@ -138,7 +139,9 @@ function_exists('mb_internal_encoding') and mb_internal_encoding(flextype('regis
/**
* Set default timezone
*/
date_default_timezone_set(flextype('registry')->get('flextype.settings.timezone'));
if (in_array(flextype('registry')->get('flextype.settings.timezone'), DateTimeZone::listIdentifiers())) {
date_default_timezone_set(flextype('registry')->get('flextype.settings.timezone'));
}
/**
* Init shortocodes