Skip to content

Commit

Permalink
Move storeId operations inside if statement (#1261)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sekiphp authored Dec 12, 2020
1 parent 597d02d commit 2bedae9
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions app/code/core/Mage/Catalog/Model/Resource/Abstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -635,12 +635,13 @@ public function getAttributeRawValue($entityId, $attribute, $store)
/**
* Collecting typed attributes, performing separate SQL query for each attribute type table
*/
if ($store instanceof Mage_Core_Model_Store) {
$store = $store->getId();
}

$store = (int)$store;
if ($typedAttributes) {
if ($store instanceof Mage_Core_Model_Store) {
$store = $store->getId();
}

$store = (int)$store;

foreach ($typedAttributes as $table => $_attributes) {
$select = $adapter->select()
->from(array('default_value' => $table), array('attribute_id'))
Expand Down

0 comments on commit 2bedae9

Please sign in to comment.