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 @@ -2223,9 +2223,14 @@ private function _parseAdditionalAttributes($rowData)
2223
2223
2224
2224
$ attributeNameValuePairs = explode ($ this ->getMultipleValueSeparator (), $ rowData ['additional_attributes ' ]);
2225
2225
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 ;
2229
2234
}
2230
2235
}
2231
2236
return $ rowData ;
You can’t perform that action at this time.
0 commit comments