您好,我正在使用 magento 1.7.0.2,如果我在进行配置时尝试安装扩展程序(个人栏),则会出现以下错误:
致命错误:在第 463 行的 app/code/core/Mage/Adminhtml/Block/System/Config/Form.php 中的非对象上调用成员函数 toOptionArray()
第 463 行:$optionArray = $sourceModel->toOptionArray($fieldType == 'multiselect');
你能帮帮我吗?
$sourceModel = Mage::getSingleton($factoryName);
if ($sourceModel instanceof Varien_Object) {
$sourceModel->setPath($path);
}
if ($method) {
if ($fieldType == 'multiselect') {
$optionArray = $sourceModel->$method();
} else {
$optionArray = array();
foreach ($sourceModel->$method() as $value => $label) {
$optionArray[] = array('label' => $label, 'value' => $value);
}
}
} else {
$optionArray = $sourceModel->toOptionArray($fieldType == 'multiselect');
}
$field->setValues($optionArray);
}