Opened 12 years ago
Closed 12 years ago
#26911 closed defect (bug) (worksforme)
XML-RPC wp.getOptions : post_thumbnail option value is returned as boolean, and not string.
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Priority: | normal | |
| Severity: | normal | Version: | 3.8 |
| Component: | XML-RPC | Keywords: | |
| Focuses: | Cc: |
Description
Hi,
I think I found a bug in the Wordpress XML-RPC wp.getOptions method.
I call the wp.getOptions method with an empty option whitelist to get
a list of all the options. The result is that all option values are strings, except for the 'post_thumbnail' option, which specifies its value as boolean.
I am not sure if this is a bug.
I have attached a patch file with the fix. Sorry, I don not have SVN tools installed, so I used the patch command to create a patch (unified format).
Regards
--Rouan
Attachments (1)
Change History (4)
#1
follow-up:
↓ 2
@
12 years ago
Hey Rouan, Thanks for your patch but I guess in this case it's more a feature then a bug. The problem here is that even if we want to change the type that we still can't really fix it without to possible break clients that already using it.
I do believe that this option is the only one with a boolean value so for me this would still work. I'm curious what your issue is with this.
#2
in reply to:
↑ 1
@
12 years ago
Hi Marko,
I am using a Haskell library for reading the results, and it has to have the same type for all the option values (in my case String). I think I can work around this. I just thought that it might be a bug and I would check that out first because all the other property values are strings.
Thanks for the quick reply.
Regards.
--Rouan
Replying to markoheijnen:
Hey Rouan, Thanks for your patch but I guess in this case it's more a feature then a bug. The problem here is that even if we want to change the type that we still can't really fix it without to possible break clients that already using it.
I do believe that this option is the only one with a boolean value so for me this would still work. I'm curious what your issue is with this.
#3
@
12 years ago
- Milestone Awaiting Review deleted
- Resolution set to worksforme
- Status changed from new to closed
I wish I could fix it for you but this is not a bug.
A good solution is fixing the library but I guess it does it for a reason. Not sure since I don't know the library.
A bad solution could be creating your own class and extending wp_xmlrpc_server and use the filter wp_xmlrpc_server_class to pass your class name.
patch for class-wp-xmlrpc-server.php