Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix issue #3704 regarding integer attribute values being cast to decimal #3705

Merged
merged 3 commits into from Jul 6, 2016
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -1175,7 +1175,11 @@ public function _loadAttributes($printQuery = false, $logQuery = false)
foreach ($selectGroups as $selects) {
if (!empty($selects)) {
try {
$select = implode(' UNION ALL ', $selects);
if (is_array($selects))
{
$select = implode(' UNION ALL ', $selects);
}
else $select = $selects;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please fix code style:

if (..) {
} else {
}

$values = $this->getConnection()->fetchAll($select);
} catch (\Exception $e) {
$this->printLogQuery(true, true, $select);
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Eav/Model/ResourceModel/Helper.php
Expand Up @@ -80,6 +80,6 @@ public function getLoadAttributesSelectGroups($selects)
foreach ($selects as $selectGroup) {
$mainGroup = array_merge($mainGroup, $selectGroup);
}
return [$mainGroup];
return $mainGroup;
}
}