QQ 1640076782

2009年12月14日

OSC-修正导航历史记录错误-Fatal error:add_current_page()

Filed under: 网站程序OSC — past @ 7:28 下午

OSC-导航历史记录错误:

Fatal error: Call to a member function add_current_page() on a non-object in G:\mywork\ugg\ugg\includes\application_top.php on line 317″

找到includes\application_top.php文件

// navigation history
if (tep_session_is_registered(‘navigation’)) {
if (PHP_VERSION < 4) {
$broken_navigation = $navigation;
$navigation = new navigationHistory;
$navigation->unserialize($broken_navigation);
}

} else {
tep_session_register(‘navigation’);
$navigation = new navigationHistory;
}
$navigation->add_current_page();

替换为:

// navigation history
if (tep_session_is_registered(‘navigation’) && is_object($navigation)) {
if (PHP_VERSION < 4) {
$broken_navigation = $navigation;
$navigation = new navigationHistory;
$navigation->unserialize($broken_navigation);
}

} else {
tep_session_register(‘navigation’);
$navigation = new navigationHistory;
}
$navigation->add_current_page();

主是判断navigation是否有对像,否之则创建新对像.