aboutsummaryrefslogtreecommitdiffstats
path: root/boot.php
diff options
context:
space:
mode:
Diffstat (limited to 'boot.php')
-rw-r--r--boot.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/boot.php b/boot.php
index 5da93beae..004413a85 100644
--- a/boot.php
+++ b/boot.php
@@ -664,12 +664,17 @@ function sys_boot() {
require_once('include/dba/dba_driver.php');
if (!App::$install) {
- DBA::dba_factory($db_host, $db_port, $db_user, $db_pass, $db_data, $db_type, App::$install);
+
+ if (empty($db_charset)) {
+ $db_charset = ((intval($db_type) === 0) ? 'utf8mb4' : 'UTF8');
+ }
+
+ DBA::dba_factory($db_host, $db_port, $db_user, $db_pass, $db_data, $db_type, $db_charset, App::$install);
if (!DBA::$dba->connected) {
system_unavailable();
}
- unset($db_host, $db_port, $db_user, $db_pass, $db_data, $db_type);
+ unset($db_host, $db_port, $db_user, $db_pass, $db_data, $db_type, $db_charset);
/*
* Load configs from db. Overwrite configs from .htconfig.php