bobbingwide / vgc

VGC - Garden Vista Group theme
GNU General Public License v2.0
0 stars 0 forks source link

Support PHP 8.1 and PHP 8.2 #62

Open bobbingwide opened 10 months ago

bobbingwide commented 10 months ago

Update code to run without problems in PHP 8.1 and 8.2

See https://github.com/bobbingwide/bobbingwide/issues/103

bobbingwide commented 10 months ago

There was a problem displaying LED Lighting option for https://gvg.co.uk/store/deponti-bosco-veranda-4060x2500mm/

In the live site, the option is displayed as an empty select list.

In the test envirionment a message was produced because there were no options for this particular product.

Note: For other products in the range the option is shown as PRICE ON ENQUIRY

image

This problem occurs with PHP 8.0 and above.

Two fixes:

  1. Change the code to cater for no options
  2. Update the product to correct the data.
bobbingwide commented 10 months ago

When updating A test product 10 x 10ft (ID 9566) the following message was produced.

PHP Warning: Undefined array key "_square_meter" in C:\apache\htdocs\wordpress\wp-content\themes\vgc\inc\custom-woo-functions.php on line 425

It seems that this message is produced when updating any product.