Guest Posted February 16, 2010 Share Posted February 16, 2010 Hi On completing the payment at the bank on our site, the continue button which should return the customer to the site is showing an error message when clicked. Fatal error: Using $this when not in object context in /var/www/vhosts/interiors-europe.co.uk/httpsdocs/catalog/includes/vendor_order_data.php on line 18 I've done some digging around and our recent upgrade from PHP4 to PHP5 may be at the root of this. However we can't go back to the old PHP4 server, nor can we easily upgrade to OsCommerce 3 (which I believe works better with PHP5?) due to the highly customised nature of the site. Does anyone know of a fix for this? Someone else had the same issue but it looks like she had to revert to PHP4 as no one knew a fix... we don't have that luxury unfortunately. Link to comment Share on other sites More sharing options...
Guest Posted February 16, 2010 Share Posted February 16, 2010 Truff, Is that a payment module from the contribution area ? Or a gateway offered by a 3rd party company? In either case, it is the code in the specified file that needs to be upgraded so support should be sought out by the contributor or the 3rd party company to make it PHP5 compliant. Chris Link to comment Share on other sites More sharing options...
MrPhil Posted February 16, 2010 Share Posted February 16, 2010 More recent versions of PHP are more picky about what you can do to the special $this pointer. Read http://www.oscommerce.com/ext/update-20051113.html#_Toc119693703 and http://www.oscommerce.com/forums/index.php?showtopic=272050&st=0&p=1116630&hl="$this"%20null%20assign&fromsearch=1entry1116630 to see that $this cannot be assigned 0 or null. Link to comment Share on other sites More sharing options...
Guest Posted February 16, 2010 Share Posted February 16, 2010 Truff, Is that a payment module from the contribution area ? Or a gateway offered by a 3rd party company? In either case, it is the code in the specified file that needs to be upgraded so support should be sought out by the contributor or the 3rd party company to make it PHP5 compliant. Chris Hi Chris It's a 3rd-party company (Barclays) and the "go back" (Continue) button is situated on their extrenal payment gateway site. Link to comment Share on other sites More sharing options...
Guest Posted February 16, 2010 Share Posted February 16, 2010 More recent versions of PHP are more picky about what you can do to the special $this pointer. Read http://www.oscommerce.com/ext/update-20051113.html#_Toc119693703 and http://www.oscommerce.com/forums/index.php?showtopic=272050&st=0&p=1116630&hl="$this"%20null%20assign&fromsearch=1entry1116630 to see that $this cannot be assigned 0 or null. Okay... If it can't be assigned 0 or null, what would we put instead? Link to comment Share on other sites More sharing options...
MrPhil Posted February 16, 2010 Share Posted February 16, 2010 Per the referenced discussions, you either unset($this); or restructure the code to do something else so the specified action is not done. You might grab the last osC (2.2 RC2a) and look at all the places where $this is used, to see how it's been handled there (I think all the $this problems are fixed in RC2a). Failing that, or if you're not experienced with PHP, you're going to have to go to the supplier of that module and ask them to fix it. If Barclays wants your continued patronage, they should fix their code. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.