Out with split(), in with explode()

This commit is contained in:
Tony Landis
2009-03-27 23:20:19 -06:00
parent ff9e25abcf
commit 87a8e0f92d
101 changed files with 639 additions and 639 deletions

View File

@@ -85,10 +85,10 @@ class plg_chout_NETBILLING extends base_checkout_plugin
$ret['status'] = 1;
} elseif (eregi("RET_STATUS=0",$response)) {
$ret['status'] = 0;
$mydata = split("\&",$response);
$mydata = explode("\&",$response);
foreach($mydata as $key=>$value)
{
$newdata = split('=', $value);
$newdata = explode('=', $value);
$ret[$newdata[0]] = $newdata[1];
}
$reason = urldecode($ret['RET_AUTH_MSG']);

View File

@@ -118,8 +118,8 @@ class plg_chout_SWREG_ADVANCED extends base_checkout_plugin
echo '<script language=Javascript>alert(\'SSL Failed!\') </script>';
return false;
} else {
foreach(split("&",$response) as $pair) {
list($key,$val)=split("=",$pair);
foreach(explode("&",$response) as $pair) {
list($key,$val)=explode("=",$pair);
$swreg[$key]=$val;
}
}

View File

@@ -90,13 +90,13 @@ class plg_chout_TRUSTCOMMERCE extends base_checkout_plugin
echo '<script language=Javascript>alert(\'SSL Failed!\') </script>';
return false;
} else {
$response = split("\n", trim($return));
$response = explode("\n", trim($return));
for($i=0; $i<count($response); $i++)
{
if(!empty($response[$i]))
{
unset($thisone);
$thisone = split("=", $response[$i]);
$thisone = explode("=", $response[$i]);
$varr[$thisone[0]] = $thisone[1];
}
}

View File

@@ -469,7 +469,7 @@ class umTransaction {
}
// result will be on the last line of the return
$tmp=split("\n",$result);
$tmp=explode("\n",$result);
$result=$tmp[count($tmp)-1];
// result is in urlencoded format, parse into an array