@@ -28,7 +28,7 @@ protected function getCellCoordinate($index, $row = 1)
2828 protected function action (): \Slim \Psr7 \Response
2929 {
3030 // Fields
31- $ fields = trim ($ this ->parameter ('catalog_export_columns ' , implode (PHP_EOL , \App \Domain \References \Catalog::IMPORT_EXPORT_FIELDS_DEFAULT )));
31+ $ fields = mb_trim ($ this ->parameter ('catalog_export_columns ' , implode (PHP_EOL , \App \Domain \References \Catalog::IMPORT_EXPORT_FIELDS_DEFAULT )));
3232
3333 if ($ fields ) {
3434 $ fields = array_map ('trim ' , explode (PHP_EOL , $ fields ));
@@ -103,9 +103,9 @@ protected function action(): \Slim\Psr7\Response
103103 ->setHorizontal (\PhpOffice \PhpSpreadsheet \Style \Alignment::HORIZONTAL_CENTER );
104104
105105 $ sheet ->mergeCells (
106- $ this ->getCellCoordinate (0 + $ offset ['cols ' ], $ row + 1 + $ offset ['rows ' ]) .
107- ': ' .
108- $ this ->getCellCoordinate (count ($ fields ) - 1 + $ offset ['cols ' ], $ row + 1 + $ offset ['rows ' ])
106+ $ this ->getCellCoordinate (0 + $ offset ['cols ' ], $ row + 1 + $ offset ['rows ' ])
107+ . ': '
108+ . $ this ->getCellCoordinate (count ($ fields ) - 1 + $ offset ['cols ' ], $ row + 1 + $ offset ['rows ' ])
109109 );
110110
111111 $ lastCategory = $ model ->category_uuid ;
@@ -116,7 +116,7 @@ protected function action(): \Slim\Psr7\Response
116116 $ attributes = $ model ->attributes ;
117117
118118 foreach ($ fields as $ index => $ field ) {
119- if (trim ($ field )) {
119+ if (mb_trim ($ field )) {
120120 $ cell = $ sheet ->getCell ($ this ->getCellCoordinate ($ index + $ offset ['cols ' ], $ row + 1 + $ offset ['rows ' ]));
121121
122122 // set default vertical aligment
0 commit comments