Skip to content

Commit ab558bd

Browse files
committed
Fix error with uninstantiated resource model
1 parent e69be44 commit ab558bd

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

app/code/Magento/Catalog/Model/Category.php

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,17 @@ protected function _construct()
303303
*/
304304
protected function getCustomAttributesCodes()
305305
{
306-
return $this->_resource->getCustomAttributesCodes();
306+
return $this->_getResource()->getCustomAttributesCodes();
307+
}
308+
309+
/**
310+
* @throws \Magento\Framework\Exception\LocalizedException
311+
* @return \Magento\Catalog\Model\ResourceModel\Category
312+
* @deprecated because resource models should be used directly
313+
*/
314+
protected function _getResource()
315+
{
316+
return parent::_getResource();
307317
}
308318

309319
/**

0 commit comments

Comments
 (0)