Skip to content
This repository has been archived by the owner on May 16, 2018. It is now read-only.

Zend_XmlRpc_Value is not standard compliant #229

Closed
graywolf opened this issue Oct 24, 2013 · 3 comments
Closed

Zend_XmlRpc_Value is not standard compliant #229

graywolf opened this issue Oct 24, 2013 · 3 comments

Comments

@graywolf
Copy link
Contributor

Zend_XmlRpc_Value is not standard compliant, as it fails to parse this xml:

<array>
    <data>
        <value>a</value>
        <value>b</value>
    </data>
</array>

if however works for

<array>
    <data>
        <value><string>a</string></value>
        <value><string>b</string></value>
    </data>
</array>

But standard (http://xmlrpc.scripting.com/spec.html) specifies "If no type is indicated, the type is string.".

Zend version: 1.12.3
PHP version: 5.5.5

@graywolf
Copy link
Contributor Author

Solution is to add this

$value = str_replace(array('<value>', '</value>'), '', $xml->asXML());

Created pull request with the fix.

@weierophinney
Copy link
Member

Just out of curiousity, what XML-RPC client were you working with that wasn't wrapping strings with <string>? The XML-RPC component has existed since before the 0.2.0 pre-release version (I contributed the server), and this is the first I've seen anybody point out that clause in the spec -- in almost 8 years! :)

@graywolf
Copy link
Contributor Author

It's some java backend in our company, but I've no idea what it uses for xmlrpc

weierophinney pushed a commit that referenced this issue Oct 30, 2013
weierophinney pushed a commit to zendframework/zendframework that referenced this issue Nov 1, 2013
weierophinney pushed a commit to zendframework/zendframework that referenced this issue Nov 1, 2013
xopherdeep pushed a commit to xopherdeep/Zend-Framework-v1 that referenced this issue Jul 3, 2014
gianarb pushed a commit to zendframework/zend-xmlrpc that referenced this issue May 15, 2015
gianarb pushed a commit to zendframework/zend-xmlrpc that referenced this issue May 15, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants