PHP 8.5.0 Beta 3 available for testing

Voting

: zero minus zero?
(Example: nine)

The Note You're Voting On

angelo at at dot com
14 years ago
A note, response from xmlrpc_decode is not always an array. Whenever the XMLRPC server returns a string, xmlrpc_is_fault will complain about not being an array.

Best way to detect errors is

<?php


$response
= xmlrpc_decode($file);

if (
is_array($response) && xmlrpc_is_fault($response)) {
throw new
Exception($response['faultString'], $response['faultCode']);
}

?>

<< Back to user notes page

To Top