Skip to content

Commit 5eb0fd4

Browse files
committed
AC-6958: admin product import improvements
1 parent c62f49d commit 5eb0fd4

File tree

1 file changed

+2
-1
lines changed
  • app/code/Magento/CatalogImportExport/Model/Import

1 file changed

+2
-1
lines changed

app/code/Magento/CatalogImportExport/Model/Import/Product.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
*/
4848
class Product extends AbstractEntity
4949
{
50+
private const COL_NAME_FORMAT = '/[\x00-\x1F\x7F]/';
5051
private const DEFAULT_GLOBAL_MULTIPLE_VALUE_SEPARATOR = ',';
5152
public const CONFIG_KEY_PRODUCT_TYPES = 'global/importexport/import_product_types';
5253
private const HASH_ALGORITHM = 'sha256';
@@ -1632,7 +1633,7 @@ protected function _saveProducts()
16321633
}
16331634

16341635
// remove null byte character
1635-
$rowData[self::COL_NAME] = preg_replace('/[\x00-\x1F\x7F]/', '', $rowData[self::COL_NAME]);
1636+
$rowData[self::COL_NAME] = preg_replace(self::COL_NAME_FORMAT, '', $rowData[self::COL_NAME]);
16361637

16371638
$rowSku = $rowData[self::COL_SKU];
16381639
$rowSkuNormalized = mb_strtolower($rowSku);

0 commit comments

Comments
 (0)