KickstartForm: add 'UTF-8' to array of allowed charsets, to support Postgres

This commit is contained in:
J Skoba 2019-09-03 03:45:18 -04:00 committed by Thomas Gelf
parent 7a2a406edb
commit eae7a8ab86

View File

@ -197,7 +197,7 @@ class KickstartForm extends DirectorForm
if ($resourceName = $this->getResourceName()) { if ($resourceName = $this->getResourceName()) {
$resourceConfig = ResourceFactory::getResourceConfig($resourceName); $resourceConfig = ResourceFactory::getResourceConfig($resourceName);
if (! isset($resourceConfig->charset) if (! isset($resourceConfig->charset)
|| ! in_array($resourceConfig->charset, array('utf8', 'utf8mb4')) || ! in_array($resourceConfig->charset, array('utf8', 'utf8mb4', 'UTF-8'))
) { ) {
if ($resource = $this->getElement('resource')) { if ($resource = $this->getElement('resource')) {
$resource->addError('Please change the encoding for the director database to utf8'); $resource->addError('Please change the encoding for the director database to utf8');