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

search for in the

xmlrpc_parse_method_descriptions> <xmlrpc_get_type
Last updated: Fri, 20 May 2011

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 )
Warning

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 dexmlrpc_encode_request().

Ver también



add a note add a note User Contributed Notes xmlrpc_is_fault
angelo at at dot com 25-Jan-2011 08:31
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