Guest Posted November 30, 2002 Share Posted November 30, 2002 Hmm i get this for the application_top.php for the cataloge The offending lines are // 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(); Anyone got any ideas? Link to comment Share on other sites More sharing options...
DragonEyeDesign Posted May 1, 2004 Share Posted May 1, 2004 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 More sharing options...
Guest Posted July 21, 2008 Share Posted July 21, 2008 I don't know, but I was using PHP 5, and because a payment module I had to imigrate to an ASP server (php compatibility installed). After this change, the error apearred.. Thank you for the code correction! It is all right now!!! Link to comment Share on other sites More sharing options...
dynamoeffects Posted July 30, 2008 Share Posted July 30, 2008 DragonEyeDesign's code is incorrect and will cause a new problem of your navigation history continually getting erased. This is the correct fix: // navigation history if (tep_session_is_registered('navigation')) { if (PHP_VERSION < 4) { $broken_navigation = $navigation; $navigation = new navigationHistory; $navigation->unserialize($broken_navigation); } elseif (!is_object($navigation)) { $navigation = new navigationHistory; } } else { tep_session_register('navigation'); $navigation = new navigationHistory; } $navigation->add_current_page(); Please use the forums for support! I am happy to help you here, but I am unable to offer free technical support over instant messenger or e-mail. Link to comment Share on other sites More sharing options...
phamau Posted September 24, 2008 Share Posted September 24, 2008 wow, That is a wonderful fix, I was scratching my head after I just installed a contribution which caused this error. Thanks once again for the fix. Link to comment Share on other sites More sharing options...
sunrise99 Posted November 5, 2008 Share Posted November 5, 2008 DragonEyeDesign's code is incorrect and will cause a new problem of your navigation history continually getting erased. This is the correct fix: // navigation history if (tep_session_is_registered('navigation')) { if (PHP_VERSION < 4) { $broken_navigation = $navigation; $navigation = new navigationHistory; $navigation->unserialize($broken_navigation); } elseif (!is_object($navigation)) { $navigation = new navigationHistory; } } else { tep_session_register('navigation'); $navigation = new navigationHistory; } $navigation->add_current_page(); yes, this code is right!! Many Thanks! Best Regards, Link to comment Share on other sites More sharing options...
lei_tx Posted August 4, 2010 Share Posted August 4, 2010 DragonEyeDesign's code is incorrect and will cause a new problem of your navigation history continually getting erased. This is the correct fix: // navigation history if (tep_session_is_registered('navigation')) { if (PHP_VERSION < 4) { $broken_navigation = $navigation; $navigation = new navigationHistory; $navigation->unserialize($broken_navigation); } elseif (!is_object($navigation)) { $navigation = new navigationHistory; } } else { tep_session_register('navigation'); $navigation = new navigationHistory; } $navigation->add_current_page(); I strongly recommend this code! :rolleyes: it solved the problem perfectly. that is, the navigation history is still there. I've tried other code. they looks like solved the problem, but actually the navigation history has lost! Link to comment Share on other sites More sharing options...
MrPhil Posted August 4, 2010 Share Posted August 4, 2010 This bug, which will evidently never be fixed, has been discussed many times: http://www.oscommerce.com/forums/index.php?showtopic=346007 http://www.oscommerce.com/forums/index.php?showtopic=168369 http://www.oscommerce.com/forums/topic/168369-call-to-member-function-or-a-non-object/page__st__20 Did you look at all of these? The fix I've seen recommended most often (although there's no official word whether it's the right one) is // 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 { $navigation = new navigationHistory; } } else { tep_session_register('navigation'); $navigation = new navigationHistory; } $navigation->add_current_page(); Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.