WordPress.org

Make WordPress Core

Opened 3 years ago

Last modified 3 years ago

#16980 new defect (bug)

Empty Values are converted to null by class-ixr.php — at Version 2

Reported by: nprasath002 Owned by:
Milestone: Awaiting Review Priority: normal
Severity: major Version: 3.1
Component: XML-RPC Keywords: dev-feedback has-patch
Focuses: Cc:

Description (last modified by ocean90)

I tried to fix the following bug #10599
Found out when you send and empty value via xmlrpc it converts it to null value.

Say you send and array of arguments for mw_editpost, set

$content_struct[mt_keywords] = '';


IXR client passes a null value instead of an empty value.

In mw_post method consider this statement

$tags_input = isset( $content_structmt_keywords? ) ? $content_struct[mt_keywords] : null;

Even if you send an empty value this statement fails because

$content_struct[mt_keywords]


is set to null by IXR client.

Change History (2)

comment:1 nprasath0023 years ago

I tried to fix the following bug
http://core.trac.wordpress.org/ticket/10599
Found out when you send and empty value via xmlrpc it converts it to null value.

Say you send and array of arguments for mw_editpost, set

$content_struct[mt_keywords] = '';


IXR client passes a null value instead of an empty value.

In mw_post method consider this statement

$tags_input = isset( $content_struct[mt_keywords] ) ? $content_struct[mt_keywords] : null;

Even if you send an empty value this statement fails because

$content_struct[mt_keywords]


is set to null by IXR client.

Last edited 3 years ago by nprasath002 (previous) (diff)

comment:2 ocean903 years ago

  • Description modified (diff)

Copied from the comment.

Note: See TracTickets for help on using tickets.