diff --git a/phpgwapi/inc/class.soapclient.inc.php b/phpgwapi/inc/class.soapclient.inc.php index 9ee9ebea53..c83c5ee6d2 100644 --- a/phpgwapi/inc/class.soapclient.inc.php +++ b/phpgwapi/inc/class.soapclient.inc.php @@ -34,7 +34,7 @@ class soapclient } } - function call($method,$params=array(),$namespace=false,$soapAction=false) + function call($method,$params='',$namespace=false,$soapAction=false) { if($this->endpointType == 'wsdl') { @@ -106,7 +106,8 @@ class soapclient { $this->debug("got fault"); $faultArray = $return->decode(); - foreach($faultArray as $k => $v) + while(list($k,$v) = each($faultArray)) + /* foreach($faultArray as $k => $v) */ { print "$k = $v
"; } diff --git a/phpgwapi/inc/class.soapmsg.inc.php b/phpgwapi/inc/class.soapmsg.inc.php index 37b35366db..a5445e2d99 100644 --- a/phpgwapi/inc/class.soapmsg.inc.php +++ b/phpgwapi/inc/class.soapmsg.inc.php @@ -14,7 +14,8 @@ class soapmsg { global $namespaces; $i = count($namespaces); - foreach($new_namespaces as $v) + while(list($v) = each($new_namespaces)) + /* foreach($new_namespaces as $v) */ { $namespaces[$v] = "ns".$i++; } @@ -28,7 +29,8 @@ class soapmsg function make_envelope($payload) { global $namespaces; - foreach($namespaces as $k => $v) + while(list($k,$v) = each($namespaces)) + /* foreach($namespaces as $k => $v) */ { $ns_string .= " xmlns:$v=\"$k\""; } diff --git a/phpgwapi/inc/class.soapval.inc.php b/phpgwapi/inc/class.soapval.inc.php index 6262a7a4cc..febfad92c5 100644 --- a/phpgwapi/inc/class.soapval.inc.php +++ b/phpgwapi/inc/class.soapval.inc.php @@ -139,7 +139,8 @@ class soapval $this->value = array(); if(is_array($vals) && count($vals) >= 1) { - foreach($vals as $k => $v) + while(list($k,$v) = each($vals)) + /* foreach($vals as $k => $v) */ { $this->debug("checking value $k : $v"); // if soapval, add.. @@ -192,7 +193,8 @@ class soapval $this->debug("adding struct '$this->name' with ".count($vals)." vals"); if(is_array($vals) && count($vals) >= 1) { - foreach($vals as $k => $v) + while(list($k,$v) = each($vals)) + /* foreach($vals as $k => $v) */ { // if serialize, if soapval if(get_class($v) == "soapval") @@ -205,7 +207,8 @@ class soapval { if(is_array($v)) { - foreach($v as $a => $b) + while(list($a,$b) = each($v)) + /* foreach($v as $a => $b) */ { if($a == "0") { @@ -285,7 +288,8 @@ class soapval } if(is_array($soapval->value)) { - foreach($soapval->value as $k => $v) + while(list($k,$v) = each($soapval->value)) + /* foreach($soapval->value as $k => $v) */ { $xml .= $this->serializeval($v); } @@ -301,7 +305,9 @@ class soapval break; case 2: // array - foreach($soapval->value as $array_val) + reset($soapval->value); + while($array_val = each($soapval->value)) + /* foreach($soapval->value as $array_val) */ { $array_types[$array_val->type] = 1; $xml .= $this->serializeval($array_val); @@ -348,7 +354,9 @@ class soapval { if(is_array($soapval->value)) { - foreach($soapval->value as $item) + reset($soapval->value); + while($item = each($soapval->value)) + /* foreach($soapval->value as $item) */ { $return[] = $this->decode($item); } @@ -364,7 +372,9 @@ class soapval { if(is_array($soapval->value)) { - foreach($soapval->value as $item) + reset($soapval->value); + while($item = each($soapval->value)) + /* foreach($soapval->value as $item) */ { $return[$item->name] = $this->decode($item); } @@ -384,7 +394,9 @@ class soapval { global $namespaces,$soapTypes,$typemap; - foreach($typemap as $namespace => $types) + reset($typemap); + while(list($namespace,$types) = each($typemap)) + /* foreach($typemap as $namespace => $types) */ { if(in_array($type,$types)) {