Opened 13 years ago
Closed 13 years ago
#26911 closed defect (bug) (worksforme)
XML-RPC wp.getOptions : post_thumbnail option value is returned as boolean, and not string.
| Reported by: | rvdalen | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | XML-RPC | Version: | 3.8 |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: |
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
@
13 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
@
13 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
@
13 years ago
- Milestone Awaiting Review
- Resolution → worksforme
- Status new → 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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
patch for class-wp-xmlrpc-server.php