[wp-trac] [WordPress Trac] #18438: Create a new term in XMLRPC

WordPress Trac wp-trac at lists.automattic.com
Wed Mar 7 16:32:12 UTC 2012


#18438: Create a new term in XMLRPC
----------------------------+-----------------------
 Reporter:  nprasath002     |       Owner:  westi
     Type:  task (blessed)  |      Status:  accepted
 Priority:  normal          |   Milestone:  3.4
Component:  XML-RPC         |     Version:
 Severity:  normal          |  Resolution:
 Keywords:  has-patch       |
----------------------------+-----------------------

Comment (by westi):

 Replying to [comment:23 maxcutler]:
 > `get_term`/`get_term_by` return all field values as `string`s, even
 though some represent `int`s. For example, `count` and the various IDs
 (`term_id`, `parent`, `term_group`, `term_taxonomy_id`). Should we cast
 these fields to `int` in `_prepare_term`?

 We should explicitly cast everything to whatever we want it returned as
 IMHO so as to future proof the code against internal api changes (in the
 past these have accidentally changed the datatypes returned by XMLRPC).

 For anything where the db schema supports values larger than XML-RPC for
 Integers we should return them as strings to be safe.

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


More information about the wp-trac mailing list