Skip to main content

That's happened because if you rewrite some method of parent class it should contain the same amount of entered parameters and parameters should be the same type. In your case _beforeSave has one input parameter and its type is Mage_Core_Model_Abstract but you use Varien_Object. PHP doesn't allow you to do that. So instead of

protected function _beforeSave(Varien_Object $vendor)

Use

protected function _beforeSave(Mage_Core_Model_Abstract $object$vendor)

That's happened because if you rewrite some method of parent class it should contain the same amount of entered parameters and parameters should be the same type. In your case _beforeSave has one input parameter and its type is Mage_Core_Model_Abstract but you use Varien_Object. PHP doesn't allow you to do that. So instead of

protected function _beforeSave(Varien_Object $vendor)

Use

protected function _beforeSave(Mage_Core_Model_Abstract $object)

That's happened because if you rewrite some method of parent class it should contain the same amount of entered parameters and parameters should be the same type. In your case _beforeSave has one input parameter and its type is Mage_Core_Model_Abstract but you use Varien_Object. PHP doesn't allow you to do that. So instead of

protected function _beforeSave(Varien_Object $vendor)

Use

protected function _beforeSave(Mage_Core_Model_Abstract $vendor)
Source Link

That's happened because if you rewrite some method of parent class it should contain the same amount of entered parameters and parameters should be the same type. In your case _beforeSave has one input parameter and its type is Mage_Core_Model_Abstract but you use Varien_Object. PHP doesn't allow you to do that. So instead of

protected function _beforeSave(Varien_Object $vendor)

Use

protected function _beforeSave(Mage_Core_Model_Abstract $object)