Skip to content

Commit c4c2102

Browse files
author
Digital Pianism
authored
1 parent f96f0b3 commit c4c2102

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

app/code/core/Mage/Eav/Model/Entity/Abstract.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -979,7 +979,12 @@ protected function _loadModelAttributes($object)
979979
$selectGroups = $helper->getLoadAttributesSelectGroups($selects);
980980
foreach ($selectGroups as $selects) {
981981
if (!empty($selects)) {
982-
$select = $this->_prepareLoadSelect($selects);
982+
if (is_array($selects)) {
983+
$select = $this->_prepareLoadSelect($selects);
984+
} else {
985+
$select = $selects;
986+
}
987+
983988
$values = $this->_getReadAdapter()->fetchAll($select);
984989
foreach ($values as $valueRow) {
985990
$this->_setAttributeValue($object, $valueRow);

app/code/core/Mage/Eav/Model/Entity/Collection/Abstract.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1120,7 +1120,12 @@ public function _loadAttributes($printQuery = false, $logQuery = false)
11201120
foreach ($selectGroups as $selects) {
11211121
if (!empty($selects)) {
11221122
try {
1123-
$select = implode(' UNION ALL ', $selects);
1123+
if (is_array($selects)) {
1124+
$select = implode(' UNION ALL ', $selects);
1125+
} else {
1126+
$select = $selects;
1127+
}
1128+
11241129
$values = $this->getConnection()->fetchAll($select);
11251130
} catch (Exception $e) {
11261131
Mage::printException($e, $select);

app/code/core/Mage/Eav/Model/Resource/Helper/Mysql4.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ public function getLoadAttributesSelectGroups($selects)
108108
foreach ($selects as $eavType => $selectGroup) {
109109
$mainGroup = array_merge($mainGroup, $selectGroup);
110110
}
111-
return [$mainGroup];
111+
return $mainGroup;
112112
}
113113

114114
/**

0 commit comments

Comments
 (0)