Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

beanstream_webobject using deprecated split()


jimlongo

Recommended Posts

Posted

I started getting php errors after upgrading to php5.3.x because beanstream_webobject.php uses the deprecated split() function around line 73

 


foreach (split("&", $txResult) as $value) {
$aryElement = split("=", $value);
eval('$aryResult["' . $aryElement[0] . '"] = "' . $aryElement[1] . '";');
}

 

Can I switch to explode or some other function here?

 

Thanks.

Posted

Yes, you could explode it instead, since it's a constant character:

foreach (explode("&", $txResult) as $value) {
  $aryElement = explode("=", $value);

 

If it was a regular expression (pattern), you'd have to use preg_split().

Archived

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

×
×
  • Create New...