Oscommerce’te “Call to member function” veya “a non-object” hatası
Oscommerce'te bazen şöyle bir hata ile karşılaşılmaktadır:
Fatal error: Call to a member function add_current_page() on a non-object in /home/arceliks/public_html/includes/application_top.php on line 312
Bu hatayı düzeltmek için şu işlemi yapmanız gerekmektedir:
1. Öncelikle düzenleme yapmadan şu dosyayı yedekleyin: catalog\includes\application_top.php sonra bu dosyayı açıp şu düzeltmeyi yapın:
KOD:
----------------------------
// 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();
---------------------------
Yakardaki kodu aşağıdakiyle değiştirin:
KOD:
---------------------------------------
// navigation history
if (tep_session_is_registered('navigation')) {
if (PHP_VERSION < 4) {
$broken_navigation = $navigation;
$navigation = new navigationHistory;
$navigation->unserialize($broken_navigation);
} else {
$navigation = new navigationHistory;
}
} else {
tep_session_register('navigation');
$navigation = new navigationHistory;
}
$navigation->add_current_page();
--------------------------------------