downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | conferences | my php.net

search for in the

xmlrpc_parse_method_descriptions> <xmlrpc_get_type
[edit] Last updated: Fri, 17 May 2013

view this page in

xmlrpc_is_fault

(PHP 4 >= 4.3.0, PHP 5)

xmlrpc_is_faultDetermina si el valor de un arreglo representa una falla del XMLRPC

Descripción

bool xmlrpc_is_fault ( array $arg )
Advertencia

Esta función ha sido declarada EXPERIMENTAL. Su comportamiento, su nombre y la documentación que le acompaña puede cambiar sin previo aviso en futuras versiones de PHP. Use esta función bajo su propio riesgo.

Parámetros

arg

El arreglo devuelto por xmlrpc_decode().

Valores devueltos

Devuelve TRUE si emabargo si el argumento significa fallo retorna, FALSE. La descripción de la falla o falta está disponible en $arg["faultString"], fault el código está en $arg["faultCode"].

Ejemplos

Ver ejemplo de xmlrpc_encode_request().

Ver también



add a note add a note User Contributed Notes xmlrpc_is_fault - [1 notes]
up
0
angelo at at dot com
2 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']);
    }
   
?>

 
show source | credits | stats | sitemap | contact | advertising | mirror sites