Skip to content

Commit

Permalink
Merge branch 'main' into next
Browse files Browse the repository at this point in the history
  • Loading branch information
fballiano committed Jun 22, 2023
2 parents 0e0617d + 0992d8c commit 66c2c20
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class Mage_Catalog_Model_Attribute_Backend_Customlayoutupdate extends Mage_Eav_M
public function validate($object)
{
$attributeName = $this->getAttribute()->getName();
$xml = trim($object->getData($attributeName));
$xml = trim((string)$object->getData($attributeName));

if (!$this->getAttribute()->getIsRequired() && empty($xml)) {
return true;
Expand All @@ -42,7 +42,7 @@ public function validate($object)
$validator = Mage::getModel('adminhtml/layoutUpdate_validator');
if (!$validator->isValid($xml)) {
$messages = $validator->getMessages();
//Add first message to exception
// add first message to exception
$massage = array_shift($messages);
$eavExc = new Mage_Eav_Model_Entity_Attribute_Exception($massage);
$eavExc->setAttributeCode($attributeName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,10 +230,10 @@ protected function _loadPrices()
$sortOrder = 1;
foreach ($this->_items as $item) {
$productAttribute = $item->getProductAttribute();
$productAttributeCode = $productAttribute->getAttributeCode();
if (!($productAttribute instanceof Mage_Eav_Model_Entity_Attribute_Abstract)) {
continue;
}
$productAttributeCode = $productAttribute->getAttributeCode();
$options = $productAttribute->getFrontend()->getSelectOptions();

$optionsByValue = [];
Expand Down

0 comments on commit 66c2c20

Please sign in to comment.