- if (isset($sno) && $sno->kindOf() == "array") {
- $max = $sno->arraysize();
- // TODO: create debug method to print can work once more
- // print "<!-- found $max array elements -->\n";
- for ($i = 0; $i < $max; $i++) {
- $rec = $sno->arraymem($i);
- if ($rec->kindOf() != "struct") {
- $err = "Found non-struct in array at element $i";
- break;
- }
- // extract name and age from struct
- $n = $rec->structmem("name");
- $a = $rec->structmem("age");
- // $n and $a are xmlrpcvals,
- // so get the scalarval from them
- $agar[$n->scalarval()] = $a->scalarval();
+ $max = $sno->arraysize();
+ PhpXmlRpc\Server::xmlrpc_debugmsg("Found $max array elements");
+ for ($i = 0; $i < $max; $i++) {
+ $rec = $sno->arraymem($i);
+ if ($rec->kindOf() != "struct") {
+ $err = "Found non-struct in array at element $i";
+ break;