Skip to main content
added 291 characters in body
Source Link
Amit Bera
  • 77.7k
  • 20
  • 124
  • 239

Changes1:

Check Magento\Framework\Model\AbstractModel::_afterLoad() and as this method signature_afterLoad() does not have any argument,So

return parent::_afterLoad($object);

Should be

return parent::_afterLoad();

Changes2:

Also, You need to protected function _afterLoad(AbstractModel $object) to protected function _afterLoad()

Changes3:

and if (!$object->getIsMassDelete()) {

to

$object = $this;
if (!$object->getIsMassDelete()) {

Check Magento\Framework\Model\AbstractModel::_afterLoad() and as this method signature_afterLoad() does not have any argument,So

return parent::_afterLoad($object);

Should be

return parent::_afterLoad();

Changes1:

Check Magento\Framework\Model\AbstractModel::_afterLoad() and as this method signature_afterLoad() does not have any argument,So

return parent::_afterLoad($object);

Should be

return parent::_afterLoad();

Changes2:

Also, You need to protected function _afterLoad(AbstractModel $object) to protected function _afterLoad()

Changes3:

and if (!$object->getIsMassDelete()) {

to

$object = $this;
if (!$object->getIsMassDelete()) {
Source Link
Amit Bera
  • 77.7k
  • 20
  • 124
  • 239

Check Magento\Framework\Model\AbstractModel::_afterLoad() and as this method signature_afterLoad() does not have any argument,So

return parent::_afterLoad($object);

Should be

return parent::_afterLoad();