Magento - Fatal error: Call to a member function toOptionArray() on a non-object ../System/Config/Form.php on line 463

Error :

Fatal error: Call to a member function toOptionArray() on a non-object  in ../app/code/core/Mage/Adminhtml/Block/System/Config/Form.php on line 463

To solve above error go to app/code/core/Mage/Adminhtml/Block/System/Config/Form.php on line 463

you will see this piece of code

$optionArray = $sourceModel->toOptionArray($fieldType == ‘multiselect’);

Replace above code with below code

if(is_object($sourceModel)){
$optionArray = $sourceModel->toOptionArray($fieldType == ‘multiselect’);
} else {
Mage::log($e->source_model);
}

Note : remove cache before testing it.
 

Anto Sujesh Feb 29, 2016, 6:13 pm

Answers

No Discussions Found

Article Discussions

Please login to your account to leave a comments