PreferencesStore: Always use `utf8` as db connection charset

This commit is contained in:
Johannes Meyer 2021-07-26 16:36:48 +02:00
parent 517c108cc4
commit 62f1fe2c3f
1 changed files with 4 additions and 1 deletions

View File

@ -130,7 +130,10 @@ abstract class PreferencesStore
Logger::warning('The preferences backend of type INI is deprecated and will be removed with version 2.11');
$config->location = Config::resolvePath('preferences');
} elseif ($type === 'Db') {
$config->connection = new DbConnection(ResourceFactory::getResourceConfig($config->resource));
$resourceConfig = ResourceFactory::getResourceConfig($config->resource);
$resourceConfig->charset = 'utf8';
$config->connection = ResourceFactory::createResource($resourceConfig);
}
return new $storeClass($config, $user);