Skip to content

Commit 0e75f36

Browse files
cia-2.4.7-beta1-develop=bugfixes-01132023
resolve conflict
2 parents 9701133 + c2c04ab commit 0e75f36

File tree

1 file changed

+5
-0
lines changed
  • app/code/Magento/CatalogImportExport/Model/Import

1 file changed

+5
-0
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
*/
4949
class Product extends AbstractEntity
5050
{
51+
private const COL_NAME_FORMAT = '/[\x00-\x1F\x7F]/';
5152
private const DEFAULT_GLOBAL_MULTIPLE_VALUE_SEPARATOR = ',';
5253
public const CONFIG_KEY_PRODUCT_TYPES = 'global/importexport/import_product_types';
5354

@@ -1624,6 +1625,10 @@ protected function _saveProducts()
16241625
// the bunch of products will pass for the event with url_key column.
16251626
$bunch[$rowNum][self::URL_KEY] = $rowData[self::URL_KEY] = $urlKey;
16261627
}
1628+
if (!empty($rowData[self::COL_NAME])) {
1629+
// remove null byte character
1630+
$rowData[self::COL_NAME] = preg_replace(self::COL_NAME_FORMAT, '', $rowData[self::COL_NAME]);
1631+
}
16271632
$rowSku = $rowData[self::COL_SKU];
16281633
if (null === $rowSku) {
16291634
$this->getErrorAggregator()->addRowToSkip($rowNum);

0 commit comments

Comments
 (0)