From 2b33148e369e4207486a299aab0d410abbb16921 Mon Sep 17 00:00:00 2001 From: Theofilos Intzoglou Date: Tue, 11 Nov 2025 12:45:38 +0200 Subject: [PATCH] Use filter_var_array instead of filter_var. Fixes importing csv files --- attachments_component/admin/src/Helper/AttachmentsImport.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/attachments_component/admin/src/Helper/AttachmentsImport.php b/attachments_component/admin/src/Helper/AttachmentsImport.php index 33816d29..57ee6630 100644 --- a/attachments_component/admin/src/Helper/AttachmentsImport.php +++ b/attachments_component/admin/src/Helper/AttachmentsImport.php @@ -319,7 +319,7 @@ protected static function parseFieldNames($file) $field = array(); $header_line = fgetcsv($file); // Strip of the leading BOM, if present - $header_line = filter_var($header_line, FILTER_DEFAULT , FILTER_FLAG_STRIP_LOW | FILTER_FLAG_STRIP_HIGH); + $header_line = filter_var_array($header_line, FILTER_DEFAULT , FILTER_FLAG_STRIP_LOW | FILTER_FLAG_STRIP_HIGH); for ($i = 0; $i < count($header_line); $i++) { $field_name = trim(strtolower($header_line[$i])); if (in_array($field_name, AttachmentsImport::$field_names)) {