Skip to content

Commit 62609bd

Browse files
committed
Merge remote-tracking branch 'digitalpianism/develop' into maindevelop
2 parents 1923cef + 3f9b64b commit 62609bd

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

app/code/Magento/Eav/Model/Entity/AbstractEntity.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1015,7 +1015,11 @@ protected function _loadModelAttributes($object)
10151015
$selectGroups = $this->_resourceHelper->getLoadAttributesSelectGroups($selects);
10161016
foreach ($selectGroups as $selects) {
10171017
if (!empty($selects)) {
1018-
$select = $this->_prepareLoadSelect($selects);
1018+
if (is_array($selects)) {
1019+
$select = $this->_prepareLoadSelect($selects);
1020+
} else {
1021+
$select = $selects;
1022+
}
10191023
$values = $this->getConnection()->fetchAll($select);
10201024
foreach ($values as $valueRow) {
10211025
$this->_setAttributeValue($object, $valueRow);

app/code/Magento/Eav/Model/Entity/Collection/AbstractCollection.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1175,7 +1175,11 @@ public function _loadAttributes($printQuery = false, $logQuery = false)
11751175
foreach ($selectGroups as $selects) {
11761176
if (!empty($selects)) {
11771177
try {
1178-
$select = implode(' UNION ALL ', $selects);
1178+
if (is_array($selects)) {
1179+
$select = implode(' UNION ALL ', $selects);
1180+
} else {
1181+
$select = $selects;
1182+
}
11791183
$values = $this->getConnection()->fetchAll($select);
11801184
} catch (\Exception $e) {
11811185
$this->printLogQuery(true, true, $select);

app/code/Magento/Eav/Model/ResourceModel/Helper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,6 @@ public function getLoadAttributesSelectGroups($selects)
8080
foreach ($selects as $selectGroup) {
8181
$mainGroup = array_merge($mainGroup, $selectGroup);
8282
}
83-
return [$mainGroup];
83+
return $mainGroup;
8484
}
8585
}

0 commit comments

Comments
 (0)