File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
app/code/Magento/CatalogImportExport/Model/Import Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -2199,9 +2199,14 @@ private function _parseAdditionalAttributes($rowData)
2199
2199
2200
2200
$ attributeNameValuePairs = explode ($ this ->getMultipleValueSeparator (), $ rowData ['additional_attributes ' ]);
2201
2201
foreach ($ attributeNameValuePairs as $ attributeNameValuePair ) {
2202
- $ nameAndValue = explode (self ::PAIR_NAME_VALUE_SEPARATOR , $ attributeNameValuePair );
2203
- if (!empty ($ nameAndValue )) {
2204
- $ rowData [$ nameAndValue [0 ]] = isset ($ nameAndValue [1 ]) ? $ nameAndValue [1 ] : '' ;
2202
+ $ separatorPosition = strpos ($ attributeNameValuePair , self ::PAIR_NAME_VALUE_SEPARATOR );
2203
+ if ($ separatorPosition !== false ) {
2204
+ $ key = substr ($ attributeNameValuePair , 0 , $ separatorPosition );
2205
+ $ value = substr (
2206
+ $ attributeNameValuePair ,
2207
+ $ separatorPosition + strlen (self ::PAIR_NAME_VALUE_SEPARATOR )
2208
+ );
2209
+ $ rowData [$ key ] = $ value === false ? '' : $ value ;
2205
2210
}
2206
2211
}
2207
2212
return $ rowData ;
You can’t perform that action at this time.
0 commit comments