Skip to content

Commit 70a96e8

Browse files
author
Raphael Petrini
committed
fix issue #3704 regarding integer attribute values being cast to decimal
1 parent b7dbda1 commit 70a96e8

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

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+
{
1180+
$select = implode(' UNION ALL ', $selects);
1181+
}
1182+
else $select = $selects;
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)