Skip to content

Commit 8d899e1

Browse files
committed
Avoid use of array_merge() to appease code linter
1 parent d3e011c commit 8d899e1

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

app/code/Magento/Catalog/Model/Category/DataProvider.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -676,10 +676,9 @@ protected function getFieldsMap()
676676
foreach ($node['children'] as $childName => $childNode) {
677677
if (!empty($childNode['children'])) {
678678
// <container/> nodes need special handling
679-
$fieldsMap[$group] = array_merge(
680-
$fieldsMap[$group],
681-
array_keys($childNode['children'])
682-
);
679+
foreach ($childNode['children'] as $grandchildName => $grandchildNode) {
680+
$fieldsMap[$group][] = $grandchildName;
681+
}
683682
} else {
684683
$fieldsMap[$group][] = $childName;
685684
}

0 commit comments

Comments
 (0)