Skip to content

Commit d9d39c4

Browse files
author
Shytikov, Yehor(yshytikov)
committed
Merge pull request #1 from magento-nord/MAGETWO-44779
Magetwo 44779
2 parents f7614d2 + 53fbce1 commit d9d39c4

File tree

1 file changed

+8
-3
lines changed
  • app/code/Magento/CatalogImportExport/Model/Import

1 file changed

+8
-3
lines changed

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

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2223,9 +2223,14 @@ private function _parseAdditionalAttributes($rowData)
22232223

22242224
$attributeNameValuePairs = explode($this->getMultipleValueSeparator(), $rowData['additional_attributes']);
22252225
foreach ($attributeNameValuePairs as $attributeNameValuePair) {
2226-
$nameAndValue = explode(self::PAIR_NAME_VALUE_SEPARATOR, $attributeNameValuePair);
2227-
if (!empty($nameAndValue)) {
2228-
$rowData[$nameAndValue[0]] = isset($nameAndValue[1]) ? $nameAndValue[1] : '';
2226+
$separatorPosition = strpos($attributeNameValuePair, self::PAIR_NAME_VALUE_SEPARATOR);
2227+
if ($separatorPosition !== false) {
2228+
$key = substr($attributeNameValuePair, 0, $separatorPosition);
2229+
$value = substr(
2230+
$attributeNameValuePair,
2231+
$separatorPosition + strlen(self::PAIR_NAME_VALUE_SEPARATOR)
2232+
);
2233+
$rowData[$key] = $value === false ? '' : $value;
22292234
}
22302235
}
22312236
return $rowData;

0 commit comments

Comments
 (0)