From 510dbefce8f95e50b04b45dc55b56cd355fd6800 Mon Sep 17 00:00:00 2001 From: ralf Date: Wed, 6 Apr 2022 16:29:17 +0300 Subject: [PATCH] fix PHP 8.0 Error: explode(): Argument #2 ($string) must be of type string, array given --- .../class.importexport_wizard_basic_export_csv.inc.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/importexport/inc/class.importexport_wizard_basic_export_csv.inc.php b/importexport/inc/class.importexport_wizard_basic_export_csv.inc.php index 39442db9b7..069dfa0b53 100644 --- a/importexport/inc/class.importexport_wizard_basic_export_csv.inc.php +++ b/importexport/inc/class.importexport_wizard_basic_export_csv.inc.php @@ -220,7 +220,11 @@ class importexport_wizard_basic_export_csv // Add in extra allowed charsets $config = Api\Config::read('importexport'); - $extra_charsets = array_intersect(explode(',',$config['import_charsets']), mb_list_encodings()); + if (!is_array($config['import_charsets'])) + { + $config['import_charsets'] = explode(',',$config['import_charsets']); + } + $extra_charsets = array_intersect($config['import_charsets'], mb_list_encodings()); if($extra_charsets) { $sel_options['charset'] += array(lang('Extra encodings') => array_combine($extra_charsets,$extra_charsets)); @@ -315,4 +319,4 @@ class importexport_wizard_basic_export_csv { return $this->export_fields; } -} +} \ No newline at end of file