Under PHP-5.2.4 Zend_XmlRpc client fails to parse responses that contain empty arrays, like this:
...<member><name>messages</name><value><array><data/></array></value></member>...
I've found the probable cause for it: behavour of empty() function on SimpleXMLElement objects is changed in PHP-5.2.4 (see http://www.php.net/ChangeLog-5.php
) and the following script:
$xml = new SimpleXMLElement("<array><data/></array>");
echo "Element is empty: "; echo empty($xml->data);
prints false under PHP<5.2.4 and true under PHP-5.2.4.
Zend_XmlRpc checks for value of empty($value->data) in Zend/XmlRpc/Value.php line 330 and throws exception when $value->data is false (it is the case on PHP-5.2.4).
Proposed solution is to use isset($value->data) in that condition, since empty arrays are perfectly valid in XML-RPC responses.
When I get returned an empty array I get the Exception: Array ( [Error] => 651 [Message] => Failed to parse response ).
If I comment out lines 330 & 331 in Zend/XmlRpc/Value.php I get an empty Array() returned
If I change line 330 to use isset then I get the Exception: Array ( [Error] => 653 [Message] => Invalid XMLRPC value in response
Happy to test/try out any more suggestions
Many thanks!