Welcome Guest, Not a member yet? Register   Sign In
XML-RPC doesn't consider all data type
#1

[eluser]alex michaud[/eluser]
Hi there, first time posting in CI forum.
I'm experiencing a problem that is due I think to a bug in the XML-RPC library.
I'm trying to write a few functions to connect to the Openx API but lot of time it give me errors related to data type (integer).
When I take a look in the XML-RPC library, the values_parsing() function only seem to consider 'array', 'string' and 'struct' data type.
Code:
function values_parsing($value, $return = FALSE)
{
    if (is_array($value) && isset($value['0']))
    {
        if ( ! isset($value['1']) OR (! isset($this->xmlrpcTypes[$value['1']])))
        {
            if (is_array($value[0]))
            {
                $temp = new XML_RPC_Values($value['0'], 'array');
            }
            else
            {
                $temp = new XML_RPC_Values($value['0'], 'string');
            }
        }
        elseif(is_array($value['0']) && ($value['1'] == 'struct' OR $value['1'] == 'array'))
        {
            while (list($k) = each($value['0']))
            {
                $value['0'][$k] = $this->values_parsing($value['0'][$k], TRUE);
            }
            
            $temp = new XML_RPC_Values($value['0'], $value['1']);
        }
        else
        {
            $temp = new XML_RPC_Values($value['0'], $value['1']);
        }
    }
    else
    {
        $temp = new XML_RPC_Values($value, 'string');
    }

    return $temp;
}
I think somewhere in this function it should consider all the 7 data type (string, int, dateTime.iso8601, etc...) as mentioned in the xml-rpc specs : http://www.xmlrpc.com/spec
I saw in the forum(or bug tracking) someone reporting a problem regarding the dateTime.iso8601 format but no mention about other data type and the latest version of CI (1.7.2) doesn't seem to contain any fix for that problem either.

Now my question is : does anybody else have experienced such problem with the xml-rpc library? If so, what was your solution? Should I simply fill a bug report about this?

Thanks

Edit : Never mind, I found the problem a few days ago and it had nothing to do with the CI xml-rpc library. Though, I had to upgrade to the version 1.7.2 to fix a problem with iso8601 data type.




Theme © iAndrew 2016 - Forum software by © MyBB