svrabel Posted July 16, 2014 Share Posted July 16, 2014 I recently updated to add an SSL certificate to my site. Some of the issues that I had before with customer redirection went away, but I started receiving reports of HTTP 500 errors and a few different redirection messages. Looking at the error log, I have the following error: PHP Fatal error: Call to a member function get() on a non-object in /home/public_html/store/classes/cart.class.php on line 1015 One person reported receiving this message: the web address you entered could not be found. You were trying to go to https://www.savvystitchesapplique.stire/index.php?_a=gateway My standard and SSL store URLs are correct. I'm at a loss at what I need to look at. Quote Link to comment Share on other sites More sharing options...
bsmither Posted July 16, 2014 Share Posted July 16, 2014 The link you posted:https://www.savvystitchesapplique.stire/index.php?_a=gateway is malformed. Perhaps the link should be:https://www.savvystitchesapplique.com/store/index.php?_a=gateway In the file /classes/cart.class.php, near lines 1005-1026, make sure everything uses the getInstance() form: /** * Save basket */ public function save() { Session::getInstance()->set('', $this->basket, 'basket', true); //Only care about auto saving the cart if there is something in there if (!empty($this->basket) && isset($this->basket['contents'])) { if (User::getInstance()->is() && Config::getInstance()->get('config', 'auto_save_cart')) { static $old_basket = null; $id = User::getInstance()->getId(); $basket = serialize($this->basket['contents']); if (empty($old_basket) || $old_basket != $basket) { $old_basket = $basket; if ((Database::getInstance()->count('CubeCart_saved_cart', 'customer_id', array('customer_id' => $id))) !== false) { Database::getInstance()->update('CubeCart_saved_cart', array('basket' => $basket), array('customer_id' => $id)); } else { Database::getInstance()->insert('CubeCart_saved_cart', array('customer_id' => $id, 'basket' => $basket)); } } } } } This particular function is called during PHP's shutdown routines (after the web page has been given to the web server for delivery), and there is no way to predict what classes may still be instantiated. So, getInstance() gets a new instantiation if there isn't one already. Quote Link to comment Share on other sites More sharing options...
svrabel Posted July 16, 2014 Author Share Posted July 16, 2014 Config::getInstance() was a Globals call. Hopefully that will resolve the issue. Thanks for the speedy response. Quote Link to comment Share on other sites More sharing options...
Al Brookbanks Posted July 17, 2014 Share Posted July 17, 2014 I juts checked and this should already be in 5.2.12 or the coming 5.2.13 release. 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.