Skip to content

Commit

Permalink
Fixed deprecation warning in Mage_Downloadable_Helper_Catalog_Product…
Browse files Browse the repository at this point in the history
…_Configuration (#3187)
  • Loading branch information
fballiano committed Apr 18, 2023
1 parent 4ade428 commit 3501e73
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
14 changes: 10 additions & 4 deletions app/code/core/Mage/Catalog/Model/Product.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@
* @method $this setLinksExist(bool $value)
* @method bool getLinksPurchasedSeparately()
* @method $this setLinksPurchasedSeparately(bool $value)
* @method string getLinksTitle()
* @method array getListSwatchAttrValues()
*
* @method array getMatchedRules()
Expand Down Expand Up @@ -261,9 +260,8 @@ class Mage_Catalog_Model_Product extends Mage_Catalog_Model_Abstract
* Entity code.
* Can be used as part of method name for entity processing
*/
public const ENTITY = 'catalog_product';

public const CACHE_TAG = 'catalog_product';
public const ENTITY = 'catalog_product';
public const CACHE_TAG = 'catalog_product';
protected $_cacheTag = 'catalog_product';
protected $_eventPrefix = 'catalog_product';
protected $_eventObject = 'product';
Expand Down Expand Up @@ -675,6 +673,14 @@ public function getAttributes($groupId = null, $skipSuper = false)
return $attributes;
}

/**
* @return string
*/
public function getLinksTitle()
{
return (string)$this->_getData('links_title');
}

/**
* @return Mage_CatalogInventory_Model_Stock_Item
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ public function getLinksTitle($product)
if (strlen($title)) {
return $title;
}
return Mage::getStoreConfig(Mage_Downloadable_Model_Link::XML_PATH_LINKS_TITLE);

return (string)Mage::getStoreConfig(Mage_Downloadable_Model_Link::XML_PATH_LINKS_TITLE);
}

/**
Expand Down

0 comments on commit 3501e73

Please sign in to comment.