[wp-trac] [WordPress Trac] #20394: XMLRPC: notices for missing arguments

WordPress Trac wp-trac at lists.automattic.com
Sun Apr 8 19:21:48 UTC 2012


#20394: XMLRPC: notices for missing arguments
------------------------------------+------------------------------
 Reporter:  markoheijnen            |       Owner:
     Type:  defect (bug)            |      Status:  new
 Priority:  normal                  |   Milestone:  Awaiting Review
Component:  XML-RPC                 |     Version:  3.4
 Severity:  normal                  |  Resolution:
 Keywords:  has-patch dev-feedback  |
------------------------------------+------------------------------

Comment (by maxcutler):

 I wonder if that patch is really the right approach.

 It might be better to have a guard condition at the top of each method
 that checks that `$args` is at least a minimum length. And if the guard
 fails, return a 400 status code error.

 Sensible error messages help API consumers as well as prevent these PHP
 notices.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/20394#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list