[wp-trac] [WordPress Trac] #19733: XML-RPC returns invalid dates if the date is zero

WordPress Trac noreply at wordpress.org
Sun Oct 27 18:34:19 UTC 2013


#19733: XML-RPC returns invalid dates if the date is zero
-----------------------------------------------+---------------------
 Reporter:  koke                               |       Owner:  westi
     Type:  defect (bug)                       |      Status:  closed
 Priority:  normal                             |   Milestone:  3.4
Component:  XML-RPC                            |     Version:  3.3
 Severity:  normal                             |  Resolution:  fixed
 Keywords:  has-patch mobile needs-unit-tests  |
-----------------------------------------------+---------------------

Comment (by ericmann):

 The above two patches add two different approaches to testing
 `_convert_date()` and `_convert_date_gmt()`.  The first patch uses
 reflection to gain access to the protected methods in the XMLRPC server
 class.  The second patch creates a subclass to expose them publicly
 instead.  Both work (and pass) and I leave it to the committer to chose
 the best approach.

 '''Note:''' While the Reflection approach is cleaner in code, the subclass
 approach is easier for new devs to understand.  I would recommend
 committing 19733.tests-subclass.diff.

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


More information about the wp-trac mailing list