Closed (duplicate)
Project:
Drupal core
Version:
6.x-dev
Component:
other
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
31 Mar 2006 at 15:29 UTC
Updated:
17 Jan 2008 at 22:54 UTC
Jump to comment: Most recent
Comments
Comment #1
Steven commentedIs this necessary? It seems to me you can tell whether the request succeeded by checking if the return value of
xmlrpc() !== FALSE. Only then do you need to call xmlrpc_errno() and friends to find out more.Comment #2
chx commentedIndeed. As the docs say, for a simple call, check the return value of xmlrpc first and only on error turn to xmlrpc_error. On system.multicall you do not even need to call xmlrpc_error as the error objects are among the results (check the result for being an object and ->is_error TRUE).
Comment #3
leoburd commentedHello there,
Is xmlrpc_error() was a function private to xmlrpc.inc? If so, what you are saying makes sense. However, blogapi.module uses xmlrpc_error() to setup it's own error messages and that's not captured by testing xmlrpc() !== FALSE ...
In my case, I assumed that blogapi.module was correct and implemented a similar solution in my modules. Shall I get rid of xmlrpc_error() calls in my modules?
Thanks for your time,
.L.
Comment #4
wyssp commentedWhat happens if I expect a boolean value from my xmlrpc call? How can I distinguish between the FALSE from an error and a FALSE I got from the remote server.
Comment #5
Naryoril commentedi've got the same problem as wyssp
Comment #6
hanoiijust suggesting, if you are the one who also did the function on the server side, just let it return an int instead of a boolean so you can safely check for === false for error
Comment #7
Anonymous (not verified) commentedThis issue is being addressed for 6.x-dev here:
http://drupal.org/node/208270
Comment #8
Anonymous (not verified) commented