Magento Admin > System > Configuration > Advanced > System - Fatal Error -
i error when try access system > configuration > advanced > system
fatal error: call member function tooptionarray() on non-object in /home/server/public_html/store/app/code/core/mage/adminhtml/block/system/config/form.php on line 421
i found answer: fatal error: call member function tooptionarray()
however, code needs replaced according answer different code in file (form.php):
if ($method) { if ($fieldtype == 'multiselect') { $optionarray = $sourcemodel->$method(); } else { $optionarray = array(); foreach ($sourcemodel->$method() $value => $label) { $optionarray[] = array('label' => $label, 'value' => $value); } } } else { $optionarray = $sourcemodel->tooptionarray($fieldtype == 'multiselect'); } $field->setvalues($optionarray); } } } return $this; any ideas? thanks!
if in form.php line 398 425 have same code. code answer isn't fix, way determine real problem, can use code:
if(is_object($sourcemodel)){ $field->setvalues($sourcemodel->tooptionarray($fieldtype == 'multiselect')); } else { mage::log($e->source_model); } and have magento log file see happened. can try log debug_print_backtrace(); problem comes badly written extension.
Comments
Post a Comment