Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Fatal Error


Jason4108

Recommended Posts

Error:

Fatal error: Call to a member function on a non-object in /home/morepain/public_html/shop/includes/application_top.php on line 305

 

 

Line 305:

 $navigation->add_current_page();

 

Whole Navigation Code:

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

Link to comment
Share on other sites

Is this part of the same error.

When you said you tried uploading the admin/includes/configure.php to the catalog/includes/configure.php did you remember to revert to the original configs as you should not be uploading the admin config to the cat config

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Link to comment
Share on other sites

  • 1 month later...

Just wanted to find out if you found a solution to the fatal error problem ie

 

"Fatal error: Call to a member function on a non-object in /home/morepain/public_html/shop/includes/application_top.php on line 305

"

 

 

I have the same problem. I will be grateful if you can help.

Link to comment
Share on other sites

  • 2 months later...

After wresting briefly with this problem, I found the solution. The problem is that in some configurations (at least mine), the navigation history section in "application_top.php" doesn't catch the possibility that the session "navigation" variable is registered and the PHP version running is 4 or above. I'm really not quite sure what caused this huge oversight on the part of the developers (with all due respect).

 

Change the nagivation history chunk of code to read:

 

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

 

and it should work just fine.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...