When you successfully call the user.logout method, the returned value is simply TRUE to indicate success, however the PHP function xmlrpc_is_fault() expects an array as the response, not a single value like this - see the manual:
http://php.net/manual/en/function.xmlrpc-is-fault.php

As such, you get a PHP warning when you try to use xmlrpc_is_fault() to see if a user.logout call was successful. You could say "well don't do that then", but it seems to me user.logout should return a response in the standard expected format?

CommentFileSizeAuthor
#4 663904.patch831 bytesgdd

Comments

greg.harvey’s picture

Version: 6.x-1.x-dev » 6.x-2.x-dev

Moving over to now active dev branch.

skyredwang’s picture

if Drupal-user-logout returns a boolean value, then Services just pass the value to the server. In this case XMLRPC, if the specification of XMLRPC requires an array value, then it might be the server's responsibility to ensure that.

gdd’s picture

So in theory skyred is right, we're not doing anything different here than anywhere else, and tracing through the call stack I don't see anything untowards. However I did notice that in the method signature for user.logout, it lists the return value as struct when we are returning a bool. I could see this causing errors up the way. Greg can you try changing that to bool and see if it fixes your problem? Note this is kind of just a shot in the dark that seems to make sense from looking at the code.

gdd’s picture

Status: Active » Fixed
StatusFileSize
new831 bytes

I committed the attached patch today, if you continue having issues please reopen.

greg.harvey’s picture

Hi, sorry I didn't find time to test this. Thanks for posting the patch. I have a test script that will expose if this is still a problem - at some point I'll download the latest snapshot and see, but you probably fixed it. =)

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

greg.harvey’s picture

Status: Closed (fixed) » Active

Using the latest release, which was packaged after this patch, and the problem persists:

Warning: xmlrpc_is_fault() expects parameter 1 to be array, boolean given in /home/gharvey/workspace/xml-nqt.php on line 384
Call Stack
#	Time	Memory	Function	Location
1	0.0015	371964	{main}( )	../xml-nqt.php:0
2	3.4268	387232	xmlrpc_is_fault ( )	../xml-nqt.php:384
greg.harvey’s picture

Title: user.logout method returns a boolean, which is not what xmlrpc_is_fault() expects » user.logout method returns a single value which is not handled properly by the XML-RPC server module

Updating title, following on from skyred's comments.

marcingy’s picture

Version: 6.x-2.x-dev » 7.x-3.x-dev

bumping version

kylebrowning’s picture

Status: Active » Closed (won't fix)

unless someone provides me with PHP to show this error happening or a test, or gives a patch that fixes this (WITHOUT CHANGING A RESOURCE), I'm marking this as won't fix.