[wp-trac] [WordPress Trac] #16748: wp_die() should return proper errors when called from xmlrpc
WordPress Trac
wp-trac at lists.automattic.com
Sun Apr 17 08:07:09 UTC 2011
#16748: wp_die() should return proper errors when called from xmlrpc
--------------------------------------------+-----------------------
Reporter: koke | Owner: westi
Type: defect (bug) | Status: accepted
Priority: normal | Milestone: 3.2
Component: XML-RPC | Version: 3.1
Severity: normal | Resolution:
Keywords: has-patch mobile needs-testing |
--------------------------------------------+-----------------------
Comment (by westi):
Replying to [comment:9 ericmann]:
> I like your solution, and I think the location is accurate since we're
hooking in to the `wp_die_handler` filter. The only thing I would
recommend is changing the method name to `xmlrpc_die_handler()` for
consistency (since the default is `_default_wp_die_handler`). I'd hate
for some unsuspecting developer to call `xmlrpc_wp_die()` directly rather
than `wp_die()`.
>
> Attaching a slightly modified patch that changes the method name and
uses a simpler filter return.
A better name for the function is a good idea.
Using a closure instead of a function to hook this in isn't as it makes it
really hard to {{{remove_filter}}} the function.
Also I think we shouldn't define the function in xmlrpc.php - someone
might want to re-use it when serving xmlrpc requests on a different
endpoint.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/16748#comment:11>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list