Calling any Catalog related API (eg. catalogProductList) with correct role, user, API Key causes the API to return an error -
PHP Fatal error: Uncaught SoapFault exception: [SOAP-ENV:Server] Call to a member function getRole() on a non-object
On tracking this error, it seems that this error is due to Line 31 -
if ($current_user->getRole()->getRoleId() == $roleId) {
of Openwriter_Cartmart_Model_Product_Observer class.
The Line 29 -
$current_user = Mage::getSingleton('admin/session')->getUser();
returns null as $current_user.
Calling any Catalog related API (eg. catalogProductList) with correct role, user, API Key causes the API to return an error -
PHP Fatal error: Uncaught SoapFault exception: [SOAP-ENV:Server] Call to a member function getRole() on a non-object
On tracking this error, it seems that this error is due to Line 31 - if ($current_user->getRole()->getRoleId() == $roleId) { of Openwriter_Cartmart_Model_Product_Observer class. The Line 29 - $current_user = Mage::getSingleton('admin/session')->getUser(); returns null as $current_user.