designinggal Posted April 24, 2014 Share Posted April 24, 2014 Is there a reason this error shows up in the php error log in 5.2.10? Fatal error in classes/seo.class.php on line 735 This was changed in 5.2.10 and now getting this error in log files. Quote Link to comment Share on other sites More sharing options...
bsmither Posted April 24, 2014 Share Posted April 24, 2014 Please make these edits in seo.class.php: Line 735: $GLOBALS['db'] to Database::getInstance() Line 741: $GLOBALS['db'] to Database::getInstance() Line 748: $GLOBALS['cache'] to Cache::getInstance() Please make these edits in cart.class.php: Line 1009: $GLOBALS['session'] to Session::getInstance() Line 1012: $GLOBALS['config'] to Config::getInstance() Line 1014: $GLOBALS['user'] to User::getInstance() This has been reported. The reason for the error is that when PHP loads and instantiates class objects to use them, there is no way to predict in what order these objects are destroyed when PHP is shutting down. Each class can have a routine which it is programmed to perform when shutting down. In one such case, the Cart class, when being destroyed, saves the current basket contents - requiring the Database, Session, Config, and User classes. The developers of PHP say that there is no way to predict in what order the classes are destroyed, but they do not say why. I am going to guess that much of this activity depends on how PHP was compiled for your operating system, the version of PHP, and other environmental factors that are near-impossible to replicate on someone else's development platform. Quote Link to comment Share on other sites More sharing options...
designinggal Posted April 24, 2014 Author Share Posted April 24, 2014 Thanks but I see a lot more of these $Globals[object you want] in the code. Are these going to get replaced or wait to see if problems show up? Quote Link to comment Share on other sites More sharing options...
bsmither Posted April 24, 2014 Share Posted April 24, 2014 Yes, the CubeCart code uses $GLOBALS['name_of_class'] everywhere, except where it causes a problem. And the only time it causes a problem is when PHP is shutting down (after having completed the script it was told to run initially) and destroying objects and erasing variables. So, this problem of trying to use a class object when PHP has already destroyed it will happen, but rarely. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.