[wp-trac] [WordPress Trac] #35185: Unable to create Post via XMLRPC after upgrading to 4.4

WordPress Trac noreply at wordpress.org
Wed Dec 30 02:07:16 UTC 2015


#35185: Unable to create Post via XMLRPC after upgrading to 4.4
-----------------------------+------------------------
 Reporter:  Sandeep.Prakash  |       Owner:
     Type:  defect (bug)     |      Status:  reviewing
 Priority:  normal           |   Milestone:  4.4.1
Component:  XML-RPC          |     Version:  4.4
 Severity:  normal           |  Resolution:
 Keywords:                   |     Focuses:
-----------------------------+------------------------

Comment (by dd32):

 > It's unfortunate that r35509 actually implements "better" support for
 XML-RPC, at the cost of breaking everything that sits behind it, which
 doesn't differentiate between struct members not existing vs. them having
 a NULL value.

 I'm still not 100% sure on the way forward here, but here's the several
 use-cases which we have:

  * `<value />` and `<value></value>` (which are identical to the XML
 parser)
  * `<value><string /></value>` and `<value><string></string></value>`
  * `<value>text</value>` which is the same as
 `<value><string>text</string></value>`

 Here's one interpretation:
  * `<value />` and `<value></value>` = `NULL`  - `isset()` = false,
 `array_key_exists()` = true, will restore the 4.3 behaviour, those which
 need/want to detect the "empty" tag can do so.
  * `<value><string /></value>` and `<value><string></string></value>` =
 `''` (empty string), if any clients are specifically specifying an empty
 string here, we're going to assume that's what they actually want to do
  * `<value>text</value>` & `<value><string>text</string></value>` = same
 behaviour, both are treated as a string.

 [attachment:35185.2.diff] implements the above, and fixes the MT XML-RPC
 endpoints to use it.

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


More information about the wp-trac mailing list