Make WordPress Core

Opened 12 years ago

Closed 12 years ago

#20543 closed defect (bug) (fixed)

Removing a custom field via XML-RPC results in a PHP Notice

Reported by: scottgonzalez's profile scott.gonzalez Owned by: nacin's profile nacin
Milestone: 3.4 Priority: normal
Severity: normal Version:
Component: XML-RPC Keywords:
Focuses: Cc:


In order to remove a custom field, you pass the id without a key or value, but the code is currently checking for a value before determining if the field should be deleted.

PHP Notice: Undefined index: value in .../wp-includes/class-wp-xmlrpc-server.php on line 279

testing against HEAD.

Attachments (1)

20543.patch (905 bytes) - added by scott.gonzalez 12 years ago.

Download all attachments as: .zip

Change History (4)

#1 @nacin
12 years ago

  • Milestone changed from Awaiting Review to 3.4

#2 @nacin
12 years ago

php wp-test.php -d -t TestXMLRPCServer_wp_editPost (-d forcing WP_DEBUG on) -- before patch, error due to this notice.

#3 @nacin
12 years ago

  • Owner set to nacin
  • Resolution set to fixed
  • Status changed from new to closed

In [20583]:

Do not check for a meta value in XML-RPC set_custom_fields unless we know we are editing a key. Prevents a notice when a custom field is being deleted. props scott.gonzalez. fixes #20543.

Note: See TracTickets for help on using tickets.