VirtueMart Forum

VirtueMart 2 + 3 + 4 => Installation, Migration & Upgrade => Topic started by: RFCdesign on January 12, 2019, 22:32:23 PM

Title: shipping address error after upgrade to VirtueMart 3.4.2 and PHP 7.2
Post by: RFCdesign on January 12, 2019, 22:32:23 PM
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!
Title: Re: shipping address error after upgrade to VirtueMart 3.4.2 and PHP 7.2
Post by: GJC Web Design 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
Title: Re: shipping address error after upgrade to VirtueMart 3.4.2 and PHP 7.2
Post by: RFCdesign 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
Title: Re: shipping address error after upgrade to VirtueMart 3.4.2 and PHP 7.2
Post by: GJC Web Design 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