fix explode(): Argument #2 ($string) must be of type string, array given

This commit is contained in:
Ralf Becker 2022-01-06 19:09:48 +02:00
parent 4ed888476c
commit e05ae9ad82

View File

@ -241,7 +241,8 @@ class importexport_wizard_basic_import_csv
// Add in extra allowed charsets
$config = Api\Config::read('importexport');
$extra_charsets = array_intersect(explode(',',$config['import_charsets']), mb_list_encodings());
$extra_charsets = is_array($config['import_charsets']) ? $config['import_charsets'] : explode(',',$config['import_charsets']);
$extra_charsets = array_intersect($extra_charsets, mb_list_encodings());
if($extra_charsets)
{
$sel_options['charset'] += array(lang('Extra encodings') => array_combine($extra_charsets,$extra_charsets));