Out with split(), in with explode()
This commit is contained in:
@@ -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']);
|
||||
|
@@ -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;
|
||||
}
|
||||
}
|
||||
|
@@ -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];
|
||||
}
|
||||
}
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user