[wp-trac] [WordPress Trac] #38467: XML-RPC: Different type of postid return from getPost and getRecentPosts

WordPress Trac noreply at wordpress.org
Mon Jul 17 16:09:11 UTC 2017


#38467: XML-RPC: Different type of postid return from getPost and getRecentPosts
--------------------------+------------------------------
 Reporter:  joshuaavalon  |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  XML-RPC       |     Version:  4.6.1
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:
--------------------------+------------------------------
Changes (by stevenlinx):

 * keywords:   => has-patch


Comment:

 1.)
 @joshuaavalon is right.

 {{{metaWeblog.getRecentPosts}}} should return the same struct with the
 same data type as {{{metaWeblog.getPost}}}. The codex entry for
 {{{metaWeblog.getRecentPosts}}} says "struct: see #metaWeblog.getPost for
 fields".

 2.)
 Once the modified API code is committed, the sentence "Note that the
 returned postid is string instead of an integer." will need to be removed.

 https://codex.wordpress.org/XML-
 RPC_MetaWeblog_API#metaWeblog.getRecentPosts

 From a different perspective, doesn't the lack of such sentence in the
 original doc implies the two functions share the same data types?

 3.)
 I've uploaded a patch.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/38467#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list