Skip to content

Commit 66c2c20

Browse files
committed
Merge branch 'main' into next
2 parents 0e0617d + 0992d8c commit 66c2c20

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

app/code/core/Mage/Catalog/Model/Attribute/Backend/Customlayoutupdate.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class Mage_Catalog_Model_Attribute_Backend_Customlayoutupdate extends Mage_Eav_M
3232
public function validate($object)
3333
{
3434
$attributeName = $this->getAttribute()->getName();
35-
$xml = trim($object->getData($attributeName));
35+
$xml = trim((string)$object->getData($attributeName));
3636

3737
if (!$this->getAttribute()->getIsRequired() && empty($xml)) {
3838
return true;
@@ -42,7 +42,7 @@ public function validate($object)
4242
$validator = Mage::getModel('adminhtml/layoutUpdate_validator');
4343
if (!$validator->isValid($xml)) {
4444
$messages = $validator->getMessages();
45-
//Add first message to exception
45+
// add first message to exception
4646
$massage = array_shift($messages);
4747
$eavExc = new Mage_Eav_Model_Entity_Attribute_Exception($massage);
4848
$eavExc->setAttributeCode($attributeName);

app/code/core/Mage/Catalog/Model/Resource/Product/Type/Configurable/Attribute/Collection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,10 +230,10 @@ protected function _loadPrices()
230230
$sortOrder = 1;
231231
foreach ($this->_items as $item) {
232232
$productAttribute = $item->getProductAttribute();
233-
$productAttributeCode = $productAttribute->getAttributeCode();
234233
if (!($productAttribute instanceof Mage_Eav_Model_Entity_Attribute_Abstract)) {
235234
continue;
236235
}
236+
$productAttributeCode = $productAttribute->getAttributeCode();
237237
$options = $productAttribute->getFrontend()->getSelectOptions();
238238

239239
$optionsByValue = [];

0 commit comments

Comments
 (0)