Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Help with php update replacing split() in zones.php


gib1

Recommended Posts

Hi, please could anyone advise me how to rectify the following problem.

 

Deprecated: Function split() is deprecated in /home/___________/public_html/includes/modules/shipping/zones.php on line 124

 

Line 124 $country_zones = split("[,]", $countries_table);

 

V2.3.1

 

I have replaced split with preg_split and then explode which stops the error message on my site but all my shipping charges now = £0.00 as shipping cannot be determined at this time.

My zone shipping worked well before my hosting provider update php.

 

Where am I going wrong? Could someone point me in the right direction.

 

Many Thanks

Link to comment
Share on other sites

I have replaced split with preg_split and then explode which stops the error message on my site

Like this (source}?

catalog/includes/modules/shipping/firstpluszones.php contains a deprecated function in PHP 5.3

No file uploaded just instructions

Find line 46
$country_zones = split("[,]", $countries_table);

Replace with
$country_zones = preg_split("/[,]/", $countries_table);

Link to comment
Share on other sites

Hi,

 

Problem fixed.

 

I changed the code as Jan advised but this kept throwing up odd postage costs. After scratching my head for a couple of days and trying various things I finally removed all the information in the admin dashboard, shipping, zones and simply re-entered the same info. I'm not to sure what it has done but it seems to be ok.

 

Thanks for reading this and I hope this my help anyone else.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...