Author Topic: shipping address error after upgrade to VirtueMart 3.4.2 and PHP 7.2  (Read 409 times)

RFCdesign

  • Beginner
  • *
  • Posts: 6
Hi everyone,

My website is running fine when I use PHP 7.0.33.
After I upgraded to PHP 7.2, I will get a error message "Cannot use string offset as an array" whenever I try to enter the shipping address in checkout process.
When I switch back to PHP 7.0.33 everything is working again.

Attached are the debug message Screen shots.

Thanks!

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 8834
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 2.6.22 & 3.2.14
Re: shipping address error after upgrade to VirtueMart 3.4.2 and PHP 7.2
« Reply #1 on: January 12, 2019, 22:55:01 pm »
you need to switch on Joomla debug so u can see the call stack and know which file has the problem
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

RFCdesign

  • Beginner
  • *
  • Posts: 6
Re: shipping address error after upgrade to VirtueMart 3.4.2 and PHP 7.2
« Reply #2 on: January 16, 2019, 17:34:21 pm »
Hi GJC,

I turned on the Joomla debug and tested it with PHP 7.2 again. After I filled in the address information and hit save, it went to the  "Cannot use string offset as an array" screen with no debug information at the bottom. interestingly, after I switch back to php 7.0 and reload the website, my shopping cart still has the memory of my entered address information and is display correctly without error. Why is that?

Attached is the screenshot of the address entering page with the Joomla debug mode on.

Thanks

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 8834
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 2.6.22 & 3.2.14
Re: shipping address error after upgrade to VirtueMart 3.4.2 and PHP 7.2
« Reply #3 on: January 16, 2019, 23:22:02 pm »
if the stack wont show see if u can enable xdebug in your hosting  ( php extension) you should then get a trace as in the screen on the 500 error whitescreen page so u know where the array should be declared

GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation