Closed (fixed)
Project:
Services
Version:
5.x-0.92
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
28 May 2009 at 15:43 UTC
Updated:
20 Jun 2009 at 05:21 UTC
The check to make sure a parameter is present is:
if (!is_numeric($args[$key]) && empty($args[$key]))
That rejects empty arrays. Using isset instead seems to give the right behavior. Patch attached.
| Comment | File | Size | Author |
|---|---|---|---|
| services_emptyarray.patch | 555 bytes | scottgifford |
Comments
Comment #1
marcingy commentedhmm head for d5 has a different conditional to this patch
Which I believe resolves this issue.
Comment #2
scottgifford commentedIt does seem to fix the empty array issue, thanks! The conditional in d5 head still rejects empty strings, though, while the conditional in the patch will allow them.
I'm not sure which behavior is correct, and I'm not really an expert in XML-RPC, but it seems to me there should be some way to pass empty strings.
Comment #3
marcingy commentedHead has a different conditional check from 5.0.92 which is the check detailed above. If that works then I believe we can close this issue otherwise there is a different issue at play. I only noticed because your patch wouldn't apply to head.
Comment #4
scottgifford commentedHi marcingy, the code you pasted in rejects empty strings, but is otherwise OK. Using
issetwill allow empty strings. That was the only difference I could find between the two.Thanks!
Comment #5
marcingy commentedAlso applied to 6-x-2-dev.
Comment #6
marcingy commented