I got this error while I was installing a third party Magento module. Actually, the module was tested for higher Magento version than 1.4 and I had to install that module on Magento version 1.4.

Cause:

In older Magento versions, setConnection() function of Mage_Eav_Model_Entity_Abstract class expects the parameters only on Zend_Db_Adapter_Abstract type.

Whereas, in newer Magento version, setConnection() function of Mage_Eav_Model_Entity_Abstract class expects the parameters to be either Zend_Db_Adapter_Abstract or string type.

Solution:

Your line of code which resulted in this error might be like the one below:


$this->setConnection('customer_read', 'customer_write');

You have to change it to:


$resource = Mage::getSingleton('core/resource');

$this->setConnection($resource->getConnection('customer_read'), $resource->getConnection('customer_write'));

Categories: Magento

0 Comments

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *