From e05ae9ad8293a9c2981c37675a782145581d6ca9 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 6 Jan 2022 19:09:48 +0200 Subject: [PATCH] fix explode(): Argument #2 ($string) must be of type string, array given --- .../inc/class.importexport_wizard_basic_import_csv.inc.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/importexport/inc/class.importexport_wizard_basic_import_csv.inc.php b/importexport/inc/class.importexport_wizard_basic_import_csv.inc.php index 51231b59ef..0438b0ffa1 100644 --- a/importexport/inc/class.importexport_wizard_basic_import_csv.inc.php +++ b/importexport/inc/class.importexport_wizard_basic_import_csv.inc.php @@ -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));