Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

OMG Fatal Error ! Help


yoursoccershirts

Recommended Posts

OK i don't know what i have done put when i try view my home page in get this error.

 

 

Fatal error: Call to a member function add_current_page() on a non-object in /home/username/public_html/shop/includes/application_top.php on line 312

 

 

ive check the file in question and it looks ok to me.

 

line 312 = $navigation->add_current_page();

 

any ideas what ive done??

Link to comment
Share on other sites

The navigation class should be included on about line 127 in includes/application_top.php

 

// include navigation history class
 require(DIR_WS_CLASSES . 'navigation_history.php');

 

After that the class is instantiated just before the line creating your error

 

// 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();

 

If the add_current_page() method is not available then the file wasn't included and/or was not instantiated.

 

osCommerce hides a boatload of minor errors with the setting ..

 

  error_reporting(E_ALL & ~E_NOTICE);

 

I personally develop with ..

 

PHP5

error_reporting(E_ALL | E_STRICT);

 

or PHP4

error_reporting(E_ALL);

 

Perhaps a stricter setting may suggest more info.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...